Subject: Re: 'Safe' string copy: strlcpy() or strncpy() ?
To: Matthias Buelow <email@example.com>
From: Bill Sommerfeld <firstname.lastname@example.org>
Date: 01/26/2001 17:21:22
> strncpy() is portable and standardized (ANSI/ISO C), while strlcpy()
> is not (it only seems to exist in newer OpenBSD, FreeBSD and NetBSD
> versions, newer being post-OpenBSD 2.4, where it made its appearance,
> obviously). So you chose -- more safety for inexperienced programmers
> versus portability. I usually go for the latter.
strlcpy is making its way into vendor os's as well.