Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 369cee9 commit 4075dacCopy full SHA for 4075dac
1 file changed
cpp/ql/lib/semmle/code/cpp/security/InvalidPointerDereference/AllocationToInvalidPointer.qll
@@ -4,9 +4,9 @@
4
*
5
* Consider the following snippet:
6
* ```cpp
7
- * 1. char* begin = (char*)malloc(size);
8
- * 2. char* end = begin + size;
9
- * 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++) {
10
* 4. use(*p);
11
* 5. }
12
* ```
0 commit comments