This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: strcpy_s, strlcpy, and strncpy and checking for overflow
- From: "Yuhong Bao" <yuhongbao_386 at hotmail dot com>
- To: libc-alpha at sourceware dot org
- Date: Sat, 05 May 2007 10:17:47 -0700
- Subject: Re: strcpy_s, strlcpy, and strncpy and checking for overflow
- Bcc:
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.
_________________________________________________________________
Check Out Our List Of Trendy Restaurants. You'll Eat It Up!
http://local.live.com/?mkt=en-ca/?v=2&cid=A6D6BDB4586E357F!378