mirror of
https://github.com/github/codeql.git
synced 2025-12-21 11:16:30 +01:00
C++: Fix qhelp formatting.
This commit is contained in:
@@ -13,15 +13,16 @@ not the source buffer.</p>
|
|||||||
|
|
||||||
</recommendation>
|
</recommendation>
|
||||||
|
|
||||||
|
<example>
|
||||||
<p>In the following examples, the size of the source buffer is incorrectly used as a parameter to <code>strncpy</code>:</p>
|
<p>In the following examples, the size of the source buffer is incorrectly used as a parameter to <code>strncpy</code>:</p>
|
||||||
|
|
||||||
<example><sample src="StrncpyFlippedArgsBad.cpp" />
|
<sample src="StrncpyFlippedArgsBad.cpp" />
|
||||||
|
|
||||||
<p>The corrected version uses the size of the destination buffer, or a variable containing the size of the destination buffer as the size parameter to <code>strncpy</code>:</p>
|
<p>The corrected version uses the size of the destination buffer, or a variable containing the size of the destination buffer as the size parameter to <code>strncpy</code>:</p>
|
||||||
|
|
||||||
<example><sample src="StrncpyFlippedArgsGood.cpp" />
|
<sample src="StrncpyFlippedArgsGood.cpp" />
|
||||||
|
|
||||||
</example>
|
</example>
|
||||||
|
|
||||||
<references>
|
<references>
|
||||||
|
|
||||||
<li>cplusplus.com: <a href="http://www.cplusplus.com/reference/clibrary/cstring/strncpy/">strncpy</a>.</li>
|
<li>cplusplus.com: <a href="http://www.cplusplus.com/reference/clibrary/cstring/strncpy/">strncpy</a>.</li>
|
||||||
|
|||||||
Reference in New Issue
Block a user