Skip to content

Commit 70ac0a5

Browse files
MathiasVPjketema
andauthored
Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll
Co-authored-by: Jeroen Ketema <[email protected]>
1 parent 2cfa14b commit 70ac0a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
* 8. }
5555
* ```
5656
* this is safe because `p` is guarded to be strictly less than `end` on line 6 before the dereference on line 7. However, if we
57-
* run the query on the above without further modifications we'd see an alert on line 7. This is because range analysis infers
57+
* run the query on the above without further modifications we would see an alert on line 7. This is because range analysis infers
5858
* that `p <= end` after the increment on line 4, and thus the result of `p += 1` is seen as a valid dereference source. This
5959
* node then flows to `p` on line 6 (which is a valid dereference sink since it non-strictly upper bounds an address operand), and
6060
* range analysis then infers that the address operand of `*p` (i.e., `p`) is non-strictly upper bounded by `p`, and thus reports

0 commit comments

Comments
 (0)