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

This commit is contained in:
Mathias Vorreiter Pedersen
2023-07-21 09:55:23 +01:00
committed by GitHub
parent 369cee9ed9
commit 4075dacd52

View File

@@ -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. }
* ```