Skip to content

Commit 85314c4

Browse files
rdmarsh2jbj
andauthored
Update cpp/ql/src/Likely Bugs/Memory Management/PointerOverflow.qhelp
Co-Authored-By: Jonas Jensen <jbj@github.com>
1 parent 562f628 commit 85314c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ To check whether an index <code>i</code> is less than the length of an array,
2222
simply compare these two numbers as unsigned integers: <code>i &lt; ARRAY_LENGTH</code>.
2323
If the length of the array is defined as the difference between two pointers
2424
<code>ptr</code> and <code>p_end</code>, write <code>i &lt; p_end - ptr</code>.
25-
If i is <code>signed</code>, cast it to <code>unsigned</code>
25+
If <code>i</code> is signed, cast it to unsigned
2626
in order to guard against negative <code>i</code>. For example, write
2727
<code>(size_t)i &lt; p_end - ptr</code>.
2828
</p>

0 commit comments

Comments
 (0)