Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fa4e891

Browse files
committed
JS: fixups
1 parent 7b97fd0 commit fa4e891

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

javascript/ql/src/Security/CWE-770/MemoryExhaustion.ql

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class Configuration extends TaintTracking::Configuration {
9696
c = dst and
9797
src = c.getAnArgument()
9898
|
99-
c = DataFlow::globalVarRef("Math").getAPropertyRead().getACall() or
99+
c = DataFlow::globalVarRef("Math").getAMemberCall(_) or
100100
c = DataFlow::globalVarRef(["Number", "parseInt", "parseFloat"]).getACall()
101101
)
102102
)
@@ -191,10 +191,12 @@ class BufferSizeSink extends Sink {
191191
)
192192
or
193193
invk = clazz.getAnInvocation() and
194-
invk.getNumArgument() = 1 and
195-
index = 0
196-
or
197-
invk.getNumArgument() = 3 and index = 2
194+
(
195+
invk.getNumArgument() = 1 and
196+
index = 0
197+
or
198+
invk.getNumArgument() = 3 and index = 2
199+
)
198200
)
199201
or
200202
this = DataFlow::globalVarRef("SlowBuffer").getAnInstantiation().getArgument(0)

0 commit comments

Comments
 (0)