Skip to content

Commit e8db563

Browse files
committed
C++: Reformulate the sanitizer in 'NonConstantFormat.ql'. It should no longer incorrectly sanitize indirect nodes for which there is no result for 'asIndirectExpr'.
1 parent bfe9ae2 commit e8db563

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

cpp/ql/src/Likely Bugs/Format/NonConstantFormat.ql

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,7 @@ pragma[noinline]
120120
predicate isSanitizerNode(DataFlow::Node node) {
121121
underscoreMacro(node.asExpr())
122122
or
123-
not exists(node.asIndirectExpr()) and
124-
not exists(node.asDefiningArgument()) and
123+
exists(node.asExpr()) and
125124
cannotContainString(node.getType(), false)
126125
}
127126

0 commit comments

Comments
 (0)