JS: Simplify

This commit is contained in:
Asger F
2022-05-24 14:17:59 +02:00
parent db4b6d620a
commit 7d4a191a32

View File

@@ -78,12 +78,8 @@ module ResourceExhaustion {
exists(DataFlow::SourceNode clazz, DataFlow::InvokeNode invk, int index |
clazz = DataFlow::globalVarRef("Buffer") and this = invk.getArgument(index)
|
exists(string name |
invk = clazz.getAMemberCall(name) and
(
name = ["alloc", "allocUnsafe", "allocUnsafeSlow"] and index = 0 // the buffer size
)
)
invk = clazz.getAMemberCall(["alloc", "allocUnsafe", "allocUnsafeSlow"]) and
index = 0 // the buffer size
or
invk = clazz.getAnInvocation() and
(