Subject: Re: CVS commit: src/usr.sbin/inetd
To: <>
From: David Laight <david@l8s.co.uk>
List: current-users
Date: 07/13/2003 21:25:19
On Sun, Jul 13, 2003 at 07:15:17PM +0000, Geoff Wing wrote:
> Jun-ichiro itojun Hagino <itojun@netbsd.org> typed:
> : Modified Files:
> : 	src/usr.sbin/inetd: inetd.c
> : Log Message:
> : use strlcpy
> : cvs rdiff -r1.91 -r1.92 src/usr.sbin/inetd/inetd.c
> 
> Sometimes you have to wonder about this policy of using strlcpy() in favour
> of strcpy() in all places.  It's good to know the two byte (including NUL)
> constant strings here won't overflow the 1024 and 1025 byte buffers.

Worse that that, gcc will inline fixed length strcpy() calls, whereas
strlcpy() will always have the overhead of a function call.

	David

-- 
David Laight: david@l8s.co.uk