Re: svn commit: r292454 - head/bin/ed

2015-12-18 Thread Pedro Giffuni
> Il giorno 18/dic/2015, alle ore 18:46, Conrad Meyer ha > scritto: > > On Fri, Dec 18, 2015 at 2:44 PM, Pedro Giffuni wrote: >> Hi Warner; >> >>> Il giorno 18/dic/2015, alle ore 17:01, Warner Losh ha >>> scritto: >>> >>> Isn’t strlcpy() the more appropriate interface? strncpy doesn’t guar

Re: svn commit: r292454 - head/bin/ed

2015-12-18 Thread Garrett Cooper
> On Dec 18, 2015, at 15:46, Conrad Meyer wrote: > >> On Fri, Dec 18, 2015 at 2:44 PM, Pedro Giffuni wrote: >> Hi Warner; >> >>> Il giorno 18/dic/2015, alle ore 17:01, Warner Losh ha >>> scritto: >>> >>> Isn’t strlcpy() the more appropriate interface? strncpy doesn’t guarantee >>> NUL term

Re: svn commit: r292454 - head/bin/ed

2015-12-18 Thread Conrad Meyer
On Fri, Dec 18, 2015 at 2:44 PM, Pedro Giffuni wrote: > Hi Warner; > >> Il giorno 18/dic/2015, alle ore 17:01, Warner Losh ha >> scritto: >> >> Isn’t strlcpy() the more appropriate interface? strncpy doesn’t guarantee >> NUL termination. >> > > Maybe, but we were using strcpy() which doesn’t gu

Re: svn commit: r292454 - head/bin/ed

2015-12-18 Thread Pedro Giffuni
Hi Warner; > Il giorno 18/dic/2015, alle ore 17:01, Warner Losh 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

Re: svn commit: r292454 - head/bin/ed

2015-12-18 Thread Warner Losh
Isn’t strlcpy() the more appropriate interface? strncpy doesn’t guarantee NUL termination. Warner > On Dec 18, 2015, at 2:58 PM, Pedro F. Giffuni wrote: > > Author: pfg > Date: Fri Dec 18 21:58:42 2015 > New Revision: 292454 > URL: https://svnweb.freebsd.org/changeset/base/292454 > > Log: >

svn commit: r292454 - head/bin/ed

2015-12-18 Thread Pedro F. Giffuni
Author: pfg Date: Fri Dec 18 21:58:42 2015 New Revision: 292454 URL: https://svnweb.freebsd.org/changeset/base/292454 Log: ed(1): Prevent possible string overflows CID: 1007252 MFC after:2 weeks Modified: head/bin/ed/main.c Modified: head/bin/ed/main.c ===