C++: Rename PointerWrapAround to PointerOverflow

Overflow was the terminology I found for this in the C standard (C11
6.5.6-8).
This commit is contained in:
Jonas Jensen
2019-11-12 16:11:40 +01:00
parent bd08c64933
commit 8ed991759c
8 changed files with 6 additions and 7 deletions

View File

@@ -38,7 +38,7 @@ checking if adding it to <code>ptr</code> creates a pointer so large that it
overflows and wraps around.
</p>
<sample src="PointerWrapAround-bad.cpp" />
<sample src="PointerOverflow-bad.cpp" />
<p>
In both of these checks, the operations are performed in the wrong order.
@@ -60,7 +60,7 @@ allocation.
The next example shows how to portably check whether a number is outside the
range of an allocation between <code>ptr</code> and <code>ptr_end</code>.
</p>
<sample src="PointerWrapAround-good.cpp" />
<sample src="PointerOverflow-good.cpp" />
</example>
<references>
<li><a href="https://blog.regehr.org/archives/1395">Pointer Overflow Checking [Embedded in Academia]</a></li>

View File

@@ -1,12 +1,11 @@
/**
* @name Reliance on pointer wrap-around
* @description Adding a value to a pointer
* to see if it "wraps around" is dangerous because it relies
* @name Range check relying on pointer overflow
* @description Adding a value to a pointer to see if it overflows relies
* on undefined behavior and may lead to memory corruption.
* @kind problem
* @problem.severity error
* @precision high
* @id cpp/pointer-wrap-around
* @id cpp/pointer-overflow
* @tags reliability
* security
*/

View File

@@ -0,0 +1 @@
Likely Bugs/Memory Management/PointerOverflow.ql

View File

@@ -1 +0,0 @@
Likely Bugs/Memory Management/PointerWrapAround.ql