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

Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
This commit is contained in:
Geoffrey White
2021-05-07 16:22:48 +01:00
committed by GitHub
parent 894f5d523c
commit 5db6abe2f4

View File

@@ -61,7 +61,7 @@ predicate exprIsSubLeftOrLess(SubExpr sub, DataFlow::Node n) {
)
or
exists(DataFlow::Node other, float p, float q |
// linear access of `e`
// linear access of `n`
exprIsSubLeftOrLess(sub, other) and
linearAccess(other.asExpr(), n.asExpr(), p, q) and // other = p * e + q
p >= 1 and