Skip to content

Commit 9f2ee0d

Browse files
committed
C++: Rename 'delta' to 'deltaDerefSourceAndPai'.
1 parent b1c6ee4 commit 9f2ee0d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@
6666
* module. Since the node we are tracking is not necessarily _equal_ to the pointer-arithmetic instruction, but rather satisfies
6767
* `node.asInstruction() <= pai + deltaDerefSourceAndPai`, we need to account for the delta when checking if a guard is sufficiently
6868
* strong to infer that a future dereference is safe. To do this, we check that the guard guarantees that a node `n` satisfies
69-
* `n < node + d` where `node` is a node we know is equal to the value of the dereference source (i.e., it satisfies
70-
* `node.asInstruction() <= pai + deltaDerefSourceAndPai`) and `d <= delta`. Combining this we have
71-
* `n < node + d <= node + delta <= pai + 2*delta` (TODO: Oops. This math doesn't quite work out. This is because we need to
72-
* redefine the `BarrierConfig` to start flow at the pointer-arithmetic instruction instead of at the dereference source. When
73-
* combined with TODO above it's easy to show that this guard ensures that the dereference is safe).
69+
* `n < node + k` where `node` is a node we know is equal to the value of the dereference source (i.e., it satisfies
70+
* `node.asInstruction() <= pai + deltaDerefSourceAndPai`) and `k <= deltaDerefSourceAndPai`. Combining this we have
71+
* `n < node + k <= node + deltaDerefSourceAndPai <= pai + 2*deltaDerefSourceAndPai` (TODO: Oops. This math doesn't quite work out.
72+
* I think this is because we need to redefine the `BarrierConfig` to start flow at the pointer-arithmetic instruction instead of
73+
* at the dereference source. When combined with TODO above it's easy to show that this guard ensures that the dereference is safe).
7474
*/
7575

7676
private import cpp

0 commit comments

Comments
 (0)