> Il giorno 18/dic/2015, alle ore 18:46, Conrad Meyer <c...@freebsd.org> ha > scritto: > > On Fri, Dec 18, 2015 at 2:44 PM, Pedro Giffuni <p...@freebsd.org> wrote: >> Hi Warner; >> >>> Il giorno 18/dic/2015, alle ore 17:01, Warner Losh <i...@bsdimp.com> ha >>> scritto: >>> >>> Isn’t strlcpy() the more appropriate interface? strncpy doesn’t guarantee >>> NUL termination. >>> >> >> Maybe, but we were using strcpy() which doesn’t guarantee NULL termination >> either >> and things have been working. I also thought that portability may be >> specially important >> for the stuff in bin/. > > strcpy() does guarantee NUL termination. Otherwise it would be useless. >
Yes , my bad. I come from a non-C background and sometimes tend to (erronously) think the C library designers would keep some consistency :-/. I changed it to strlcpy() a while ago. Pedro. _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"