Strlcpy

From Hackepedia
Revision as of 11:38, 10 November 2012 by Pbug (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

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.