Skip to content

Commit 55cfadb

Browse files
committed
C++: Simplify the description of the source.
1 parent 359a9e5 commit 55cfadb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@
2222
* in `AllocationToInvalidPointer.qll` that are actually being dereferenced. We do this using a regular dataflow
2323
* configuration (see `InvalidPointerToDerefConfig`).
2424
*
25-
* This dataflow traversal defines the set of sources as any dataflow node that is non-strictly lower-bounded by the
26-
* pointer-arithmetic instruction identified by `AllocationToInvalidPointer.qll`. That is, the set of sources is any
27-
* dataflow node `source` such that `source.asInstruction() >= pai + delta1` for some `delta1 >= 0`.
25+
* This dataflow traversal defines the set of sources as any dataflow node `n` such that there exists a pointer-arithmetic
26+
* instruction `pai` found by `AllocationToInvalidPointer.qll` and `n.asInstruction() >= pai + deltaDerefSourceAndPai`.
27+
* Here, `deltaDerefSourceAndPai` is the constant difference between the source we track for finding a dereference and the
28+
* pointer-arithmetic instruction.
2829
*
2930
* The set of sinks is defined to be any address operand `addr` that is non-strictly upper-bounded by the sink. That is,
3031
* any dataflow node `n` such that `addr <= sink.asInstruction() + delta2` for some `delta2`. We call the instruction that

0 commit comments

Comments
 (0)