mirror of
https://github.com/github/codeql.git
synced 2025-12-23 20:26:32 +01:00
C++: Reformulate the sanitizer in 'NonConstantFormat.ql'. It should no longer incorrectly sanitize indirect nodes for which there is no result for 'asIndirectExpr'.
This commit is contained in:
@@ -120,8 +120,7 @@ pragma[noinline]
|
||||
predicate isSanitizerNode(DataFlow::Node node) {
|
||||
underscoreMacro(node.asExpr())
|
||||
or
|
||||
not exists(node.asIndirectExpr()) and
|
||||
not exists(node.asDefiningArgument()) and
|
||||
exists(node.asExpr()) and
|
||||
cannotContainString(node.getType(), false)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user