Subject: Re: 'Safe' string copy: strlcpy() or strncpy() ?
To: Jarom r Dolecek <firstname.lastname@example.org>
From: Ted Lemon <email@example.com>
Date: 01/26/2001 17:42:39
> Using strlcpy(), it's like:
> strlcpy(str, otherstr, sizeof(str));
> I think that the former is less error prone, so it should probably
rgree. Strncpy is from the Bad Old Days. :'(
> if 'othersrc' is shorter than sizeof(str)). On the other hand,
> strlcpy() is not part of any standard yet.
I'm not sure how bad a thing this is for NetBSD userland code, but
it's definitely a problem for non-NetBSD userland code. :'}