Update CompilerRemovalOfCodeToClearBuffers.ql

This commit is contained in:
ihsinme
2021-01-20 16:24:43 +03:00
committed by GitHub
parent dcbae8b22b
commit 4c9de4574a

View File

@@ -12,6 +12,7 @@
import cpp
import semmle.code.cpp.dataflow.DataFlow
import semmle.code.cpp.dataflow.StackAddress
/**
* A call to `memset` of the form `memset(ptr, value, num)`, for some local variable `ptr`.
@@ -34,6 +35,8 @@ class CompilerRemovaMemset extends FunctionCall {
this.getArgument(0) = v.getAnAccess() and
alloc.getASuccessor+() = this
)
or
not stackPointerFlowsToUse(this.getArgument(0), _, _, _)
}
predicate isExistsFreeForThisVariable() {