Skip to content

Commit 7d4a191

Browse files
committed
JS: Simplify
1 parent db4b6d6 commit 7d4a191

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

javascript/ql/lib/semmle/javascript/security/dataflow/ResourceExhaustionCustomizations.qll

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,8 @@ module ResourceExhaustion {
7878
exists(DataFlow::SourceNode clazz, DataFlow::InvokeNode invk, int index |
7979
clazz = DataFlow::globalVarRef("Buffer") and this = invk.getArgument(index)
8080
|
81-
exists(string name |
82-
invk = clazz.getAMemberCall(name) and
83-
(
84-
name = ["alloc", "allocUnsafe", "allocUnsafeSlow"] and index = 0 // the buffer size
85-
)
86-
)
81+
invk = clazz.getAMemberCall(["alloc", "allocUnsafe", "allocUnsafeSlow"]) and
82+
index = 0 // the buffer size
8783
or
8884
invk = clazz.getAnInvocation() and
8985
(

0 commit comments

Comments
 (0)