mirror of
https://github.com/github/codeql.git
synced 2026-04-24 00:05:14 +02:00
Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
9f9cf9f765
commit
e1763db36c
@@ -60,7 +60,7 @@
|
||||
* range analysis then infers that the address operand of `*p` (i.e., `p`) is non-strictly upper bounded by `p`, and thus reports
|
||||
* an alert on line 7.
|
||||
*
|
||||
* In order to handle this false positive, we define a barrier that identifies guards such as `p < end` that ensures that a value
|
||||
* In order to handle the above false positive, we define a barrier that identifies guards such as `p < end` that ensures that a value
|
||||
* is less than the pointer-arithmetic instruction that computed the invalid pointer. This is done in the `InvalidPointerToDerefBarrier`
|
||||
* module. Since the node we're tracking isn't necessarily _equal_ to the pointer-arithmetic instruction, but rather satisfies
|
||||
* `node.asInstruction() <= pai + delta`, we need to account for the delta when checking if a guard is sufficiently strong to infer
|
||||
|
||||
Reference in New Issue
Block a user