> On Dec 18, 2015, at 15:46, Conrad Meyer <c...@freebsd.org> wrote: > >> 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. > > DESCRIPTION > The stpcpy() and strcpy() functions copy the string src to dst (including > the terminating ‘\0’ character.)
+1 to using strlcpy instead of strcpy/strncpy. Thanks! _______________________________________________ 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"