Skip to content

Commit ecbf7ae

Browse files
committed
C++: Fix qhelp formatting.
1 parent 8a261b7 commit ecbf7ae

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,16 @@ not the source buffer.</p>
1313

1414
</recommendation>
1515

16+
<example>
1617
<p>In the following examples, the size of the source buffer is incorrectly used as a parameter to <code>strncpy</code>:</p>
1718

18-
<example><sample src="StrncpyFlippedArgsBad.cpp" />
19+
<sample src="StrncpyFlippedArgsBad.cpp" />
1920

2021
<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>
2122

22-
<example><sample src="StrncpyFlippedArgsGood.cpp" />
23-
23+
<sample src="StrncpyFlippedArgsGood.cpp" />
2424
</example>
25+
2526
<references>
2627

2728
<li>cplusplus.com: <a href="http://www.cplusplus.com/reference/clibrary/cstring/strncpy/">strncpy</a>.</li>

0 commit comments

Comments
 (0)