Update cpp/ql/src/Security/CWE/CWE-193/InvalidPointerDeref.qhelp

Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
This commit is contained in:
Mathias Vorreiter Pedersen
2023-08-22 13:02:37 +01:00
committed by GitHub
parent abe28cb106
commit e88277bd3b

View File

@@ -13,7 +13,7 @@
</recommendation>
<example>
<p>The first example allocates a buffer of size <code>size</code> and creates a local variable that stores the location that is one byte past the end of the allocation.
This local variable is then dereferenced which results in an out-of-bounds write.
This local variable is then dereferenced, which results in an out-of-bounds write.
The second example subtracts one from the <code>end</code> variable before dereferencing it. This subtraction ensures that the write correctly updates the final byte of the allocation.</p>
<sample src="InvalidPointerDeref.cpp" />