Skip to content

Commit f842d09

Browse files
Apply suggestions from code review
Co-authored-by: mc <[email protected]>
1 parent e857ac1 commit f842d09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
The third argument defines the maximum number of characters to append and should be less than or equal to the remaining space in the destination buffer.
88
Calls of the form <code>strncat(dest, src, strlen(dest))</code> or <code>strncat(dest, src, sizeof(dest))</code> set the third argument to the entire size of the destination buffer.
99
Executing a call of this type may cause a buffer overflow unless the buffer is known to be empty.
10-
Similarly, calls of the form <code>strncat(dest, src, sizeof (dest) - strlen (dest))</code> allows one byte to be written ouside the `dest` buffer.
10+
Similarly, calls of the form <code>strncat(dest, src, sizeof (dest) - strlen (dest))</code> allow one byte to be written ouside the `dest` buffer.
1111
Buffer overflows can lead to anything from a segmentation fault to a security vulnerability.</p>
1212

1313
</overview>

0 commit comments

Comments
 (0)