mirror of
https://github.com/github/codeql.git
synced 2026-04-28 10:15:14 +02:00
Update cpp/ql/src/Security/CWE/CWE-191/UnsignedDifferenceExpressionComparedZero.ql
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
This commit is contained in:
@@ -55,7 +55,7 @@ predicate exprIsSubLeftOrLess(SubExpr sub, DataFlow::Node n) {
|
||||
exists(DataFlow::Node other, float p, float q |
|
||||
// linear access of `other`
|
||||
exprIsSubLeftOrLess(sub, other) and
|
||||
linearAccess(n.asExpr(), other.asExpr(), p, q) and // e = p * other + q
|
||||
linearAccess(n.asExpr(), other.asExpr(), p, q) and // n = p * other + q
|
||||
p <= 1 and
|
||||
q <= 0
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user