&gt; The strncat man page (and similarly the C99 standard) says: &quot;[...] the size of dest must be at least strlen(dest)+n+1.&quot;<p>No, the standard does not say that.  It (both C99 and C11) says, verbatim: &quot;the maximum number of characters that can end up in the array pointed to by s1 is strlen(s1)+n+1.&quot;  If the manpage on your system says that, that&#x27;s a fairly serious deficiency in the manpage.<p>The standard also says &quot;characters that follow it [a null character] are not appended&quot;, so copying extra bytes is explicitly not correct.