Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3aafcf4

Browse files
committed
[zlaski/pointer-overflow-check] Minor tweak to Qhelp.
1 parent 9228844 commit 3aafcf4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cpp/ql/src/Likely Bugs/Memory Management/PointerOverflowCheck.qhelp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
When checking for out-of-range pointer values, one might write tests like
88
<code>p + a &lt; p</code> and check if the value "wraps around".
99
Such a test is wrong in that it relies on the overflow of <code>p + a</code>,
10-
which is undefined behavior. In fact, many optimizing compilers will remove
10+
which has undefined behavior. In fact, many optimizing compilers will remove
1111
<code>p + a &lt; p</code> altogether and replace it with the value <code>0</code>
1212
(<code>false</code>). Conversely, should <code>p + a</code> <i>not</i> overflow,
1313
the programmer may erroneously assume that the memory location <code>p + a</code>

0 commit comments

Comments
 (0)