mirror of
https://github.com/github/codeql.git
synced 2026-04-13 11:04:07 +02:00
Address review: update QLDoc comment and fix expected test output
- Clarify that arithmeticUsedInBoundsCheck applies to if-condition comparisons, not all comparisons - Update expected test line numbers to reflect added test calls
This commit is contained in:
@@ -138,9 +138,9 @@ predicate overflowIrrelevant(Expr exp) {
|
||||
|
||||
/**
|
||||
* Holds if `exp` is an arithmetic expression used directly as an operand of a
|
||||
* comparison, indicating it is part of a bounds check rather than a vulnerable
|
||||
* computation. For example, in `if (off + len > array.length)`, the addition
|
||||
* is the bounds check itself.
|
||||
* comparison in an `if`-condition, indicating it is part of a bounds check
|
||||
* rather than a vulnerable computation. For example, in
|
||||
* `if (off + len > array.length)`, the addition is the bounds check itself.
|
||||
*/
|
||||
private predicate arithmeticUsedInBoundsCheck(ArithExpr exp) {
|
||||
exists(ComparisonExpr comp |
|
||||
|
||||
Reference in New Issue
Block a user