Strlcpy: Difference between revisions

From Hackepedia
Jump to navigationJump to search
Created page with "strlcpy is a C function. It limits how large the destination buffer can be filled. This is used to prevent buffer overflows. It replaces strcpy() function when possible..."
 
(No difference)

Latest revision as of 10:38, 10 November 2012

strlcpy is a C function. It limits how large the destination buffer can be filled. This is used to prevent buffer overflows. It replaces strcpy() function when possible.

Similarily strlcat replaces strcat() which does similar.

These routines first appeared in OpenBSD and OpenSSH.