Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a272eb8

Browse files
MathiasVPjketema
andauthored
Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/AllocationToInvalidPointer.qll
Co-authored-by: Jeroen Ketema <[email protected]>
1 parent 9108982 commit a272eb8

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
* `allocation` to `a` this means that the `pai` will compute a pointer that is some number of elements beyond
1919
* the end position in the allocation. See `pointerAddInstructionHasBounds` for the implementation of this.
2020
*
21-
* In the above example, the pair `(a, b)` is `(base, size)` from the expression `base + size` on line 2. However, it could
22-
* also be something more complex like `(base, size)` where `base` is from line 3 and `size` is from line 2, and the
23-
* pointer-arithmetic instruction is `base + n` on line 3 in the following example:
21+
* In the above example, the pair `(a, b)` is `(base, size)` with `base` and `size` coming from the expression `base + size` on line 2, which is also the pointer-arithmetic instruction. In general, the pair does not necessarily correspond directly to the operands of the pointer-arithmetic instruction.
22+
* In the following example, the pair is again `(base, size)`, but with `base` coming from line 3 and `size` from line 2, and the
23+
* pointer-arithmetic instruction being `base + n` on line 3:
2424
* ```cpp
2525
* 1. int* base = new int[size];
2626
* 2. if(n <= size) {

0 commit comments

Comments
 (0)