mirror of
https://github.com/github/codeql.git
synced 2026-04-28 10:15:14 +02:00
Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/InvalidPointerToDereference.qll
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
4a276c37ac
commit
88b78284ec
@@ -8,7 +8,7 @@
|
||||
* 1. char* base = (char*)malloc(size);
|
||||
* 2. char* end = base + size;
|
||||
* 3. for(int *p = base; p <= end; p++) {
|
||||
* 4. use(*p);
|
||||
* 4. use(*p); // BUG: Should have been bounded by `p < end`.
|
||||
* 5. }
|
||||
* ```
|
||||
* this file identifies the flow from `base + size` to `end`. We call `base + size` the "dereference source" and `end`
|
||||
|
||||
Reference in New Issue
Block a user