Skip to content

Commit 04dcef5

Browse files
committed
C++: Include ComplementExpr as a sanitizer.
1 parent d2cc0d3 commit 04dcef5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

cpp/ql/src/Security/CWE/CWE-190/ArithmeticUncontrolled.ql

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,11 @@ class UncontrolledArithConfiguration extends TaintTracking::Configuration {
103103
// If this expression is part of bitwise 'and' or 'or' operation it's likely that the value is
104104
// only used as a bit pattern.
105105
node.asExpr() =
106-
any(BinaryBitwiseOperation op | op instanceof BitwiseOrExpr or op instanceof BitwiseAndExpr)
107-
.getAnOperand*()
106+
any(Operation op |
107+
op instanceof BitwiseOrExpr or
108+
op instanceof BitwiseAndExpr or
109+
op instanceof ComplementExpr
110+
).getAnOperand*()
108111
}
109112
}
110113

0 commit comments

Comments
 (0)