Skip to content

Commit 6946851

Browse files
geoffw0MathiasVP
andauthored
Update cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql
Co-authored-by: Mathias Vorreiter Pedersen <[email protected]>
1 parent 91be483 commit 6946851

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ predicate exprIsSubLeftOrLess(SubExpr sub, DataFlow::Node n) {
6363
exists(DataFlow::Node other, float p, float q |
6464
// linear access of `n`
6565
exprIsSubLeftOrLess(sub, other) and
66-
linearAccess(other.asExpr(), n.asExpr(), p, q) and // other = p * e + q
66+
linearAccess(other.asExpr(), n.asExpr(), p, q) and // other = p * n + q
6767
p >= 1 and
6868
q >= 0
6969
)

0 commit comments

Comments
 (0)