mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
Update cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/AllocationToInvalidPointer.qll
This commit is contained in:
committed by
GitHub
parent
369cee9ed9
commit
4075dacd52
@@ -4,9 +4,9 @@
|
||||
*
|
||||
* Consider the following snippet:
|
||||
* ```cpp
|
||||
* 1. char* begin = (char*)malloc(size);
|
||||
* 2. char* end = begin + size;
|
||||
* 3. for(int *p = begin; p <= end; p++) {
|
||||
* 1. char* base = (char*)malloc(size);
|
||||
* 2. char* end = base + size;
|
||||
* 3. for(int *p = base; p <= end; p++) {
|
||||
* 4. use(*p);
|
||||
* 5. }
|
||||
* ```
|
||||
|
||||
Reference in New Issue
Block a user