Skip to content

Commit e75f604

Browse files
committed
C++: Replace more text with formulas.
1 parent 7f7930b commit e75f604

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
* always consumed by an instruction that performs a dereference this lets us identify a "bad dereference". We call the
3333
* instruction that consumes the address operand the "operation".
3434
*
35-
* For example, consider the flow from `base + size` to `end` above. The sink is `end` on line 3 because that is a dataflow
36-
* node whose underlying instruction non-strictly upper bounds the address operand `p` in `use(*p)`. The load attached to `*p`
37-
* is the "operation". To ensure that the path makes intuitive sense, we only pick operations that are control-flow reachable
38-
* from the dereference sink.
35+
* For example, consider the flow from `base + size` to `end` above. The sink is `end` on line 3 because
36+
* `p <= end.asInstruction() + deltaDerefSinkAndDerefAddress` where `p` is the address operand in `use(*p)` and
37+
* `deltaDerefSinkAndDerefAddress >= 0`. The load attached to `*p` is the "operation". To ensure that the path makes
38+
* intuitive sense, we only pick operations that are control-flow reachable from the dereference sink.
3939
*
4040
* To compute the amount of the dereference is away from the final entry of the allocation, we sum the two deltas `delta1` and
4141
* `delta2`. This is done in the `operationIsOffBy` predicate (which is the only predicate exposed by this file).

0 commit comments

Comments
 (0)