Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6a97d02

Browse files
committed
C++: Address review comments.
1 parent d9d82fc commit 6a97d02

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ predicate nonNegative(SubExpr sub) {
3131
or
3232
// The subtraction is guarded by a check of the form `left >= right`.
3333
exists(GVN left, GVN right |
34+
// This is basically a poor man's version of a directional unbind operator.
3435
strictcount([left, globalValueNumber(sub.getLeftOperand())]) = 1 and
3536
strictcount([right, globalValueNumber(sub.getRightOperand())]) = 1 and
3637
isGuarded(sub, left.getAnExpr(), right.getAnExpr())

0 commit comments

Comments
 (0)