Apply suggestions from code review

Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
This commit is contained in:
Mathias Vorreiter Pedersen
2021-05-25 13:16:04 +02:00
committed by GitHub
parent e857ac1149
commit f842d09a16

View File

@@ -7,7 +7,7 @@
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.
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.
Executing a call of this type may cause a buffer overflow unless the buffer is known to be empty.
Similarly, calls of the form <code>strncat(dest, src, sizeof (dest) - strlen (dest))</code> allows one byte to be written ouside the `dest` buffer.
Similarly, calls of the form <code>strncat(dest, src, sizeof (dest) - strlen (dest))</code> allow one byte to be written ouside the `dest` buffer.
Buffer overflows can lead to anything from a segmentation fault to a security vulnerability.</p>
</overview>