Subject: Re: bin/18593: tar seg fault
To: None <netbsd-bugs@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: netbsd-bugs
Date: 10/09/2002 10:09:06
> > /* could use strlcpy instead */
> > strncpy (ar_block->header.arch_name, f_volhdr, NAMSIZ-1);
> > ar_block->header.arch_name[NAMSIZ-1] = '\0';
So why not then?
Amongst it's other foibles, strncpy is required to zero out
the entire buffer. For large buffers and short strings this
becomes a significant cost.
David
--
David Laight: david@l8s.co.uk