Update cpp/ql/src/experimental/Security/CWE/CWE-14/CompilerRemovalOfCodeToClearBuffers.ql

Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
This commit is contained in:
ihsinme
2021-01-14 17:15:36 +03:00
committed by GitHub
parent 3ad45f28c9
commit 1c4610c722

View File

@@ -38,10 +38,9 @@ class CompilerRemovaMemset extends FunctionCall {
}
predicate isExistsFreeForThisVariable() {
exists(FunctionCall free, Variable v |
free instanceof DeallocationExpr and
exists(DeallocationExpr free, Variable v |
this.getArgument(0) = v.getAnAccess() and
free.getArgument(0) = v.getAnAccess() and
free.getFreedExpr() = v.getAnAccess() and
this.getASuccessor+() = free
)
}