strcpy_s, strlcpy, and strncpy and checking for overflow
Mike Frysinger
vapier@gentoo.org
Sun May 6 07:28:00 GMT 2007
On Saturday 05 May 2007, Yuhong Bao wrote:
> But one of the arguments is that programmers should be concerned about the
> effect of truncation. strlcpy make it easier than strncpy to check for
> truncation too, and strcpy_s (part of VC2005 libraries) refuse to copy the
> string at all if the string is going to be truncated. You must use
> strncpy_s with _TRUNCATE in the count parameter.
what exactly is your point ? do you want to change something in glibc ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 827 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20070506/e5dcd38a/attachment.sig>
More information about the Libc-alpha
mailing list