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

Skip to content

Commit 9108982

Browse files
committed
C++: Update example in QLDoc.
1 parent 9cb09d6 commit 9108982

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* 1. char* base = (char*)malloc(size);
88
* 2. char* end = base + size;
99
* 3. for(int *p = base; p <= end; p++) {
10-
* 4. use(*p);
10+
* 4. use(*p); // BUG: Should have been bounded by `p < end`.
1111
* 5. }
1212
* ```
1313
* this file identifies the flow from `new int[size]` to `base + size`.

0 commit comments

Comments
 (0)