Subject: Re: 'Safe' string copy: strlcpy() or strncpy() ?
To: Jarom r Dolecek <dolecek@ics.muni.cz>
From: Ted Lemon <mellon@nominum.com>
List: tech-userlevel
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.   :'}

			       _MelloN_