mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Update CompilerRemovalOfCodeToClearBuffers.ql
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user