File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 32
32
* always consumed by an instruction that performs a dereference this lets us identify a "bad dereference". We call the
33
33
* instruction that consumes the address operand the "operation".
34
34
*
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.
39
39
*
40
40
* To compute the amount of the dereference is away from the final entry of the allocation, we sum the two deltas `delta1` and
41
41
* `delta2`. This is done in the `operationIsOffBy` predicate (which is the only predicate exposed by this file).
You can’t perform that action at this time.
0 commit comments