Re: svn commit: r343480 - head/lib/libfigpar

2019-01-27 Thread Warner Losh
On Sun, Jan 27, 2019 at 7:09 AM Devin Teske wrote: > > > > On Jan 26, 2019, at 9:31 PM, Bruce Evans wrote: > > > > On Sat, 26 Jan 2019, Stefan Esser wrote: > > > >> Am 26.01.19 um 22:59 schrieb Colin Percival: > >>> ... > >>> The length of the string was already being recalculated, by strcpy. >

Re: svn commit: r343480 - head/lib/libfigpar

2019-01-27 Thread Devin Teske
> On Jan 26, 2019, at 9:31 PM, Bruce Evans wrote: > > On Sat, 26 Jan 2019, Stefan Esser wrote: > >> Am 26.01.19 um 22:59 schrieb Colin Percival: >>> ... >>> The length of the string was already being recalculated, by strcpy. >>> >>> It seems to me that this could be written as >>> >>>

Re: svn commit: r343480 - head/lib/libfigpar

2019-01-26 Thread Bruce Evans
On Sat, 26 Jan 2019, Stefan Esser wrote: Am 26.01.19 um 22:59 schrieb Colin Percival: ... The length of the string was already being recalculated, by strcpy. It seems to me that this could be written as temp = malloc(slen + 1); if (temp == NULL) /* could not allocate memory

Re: svn commit: r343480 - head/lib/libfigpar

2019-01-26 Thread Devin Teske
> On 26 Jan 2019, at 1:59 PM, Colin Percival wrote: > > On 1/26/19 1:36 PM, Rodney W. Grimes wrote: >>> Author: se >>> Date: Sat Jan 26 21:30:26 2019 >>> New Revision: 343480 >>> URL: https://svnweb.freebsd.org/changeset/base/343480 >>> >>> Log: >>> Silence Clang Scan warning about

Re: svn commit: r343480 - head/lib/libfigpar

2019-01-26 Thread Stefan Esser
Am 26.01.19 um 22:59 schrieb Colin Percival: > On 1/26/19 1:36 PM, Rodney W. Grimes wrote: >>> Author: se >>> Date: Sat Jan 26 21:30:26 2019 >>> New Revision: 343480 >>> URL: https://svnweb.freebsd.org/changeset/base/343480 >>> >>> Log: >>> Silence Clang Scan warning about potentially unsafe use

Re: svn commit: r343480 - head/lib/libfigpar

2019-01-26 Thread Colin Percival
On 1/26/19 1:36 PM, Rodney W. Grimes wrote: >> Author: se >> Date: Sat Jan 26 21:30:26 2019 >> New Revision: 343480 >> URL: https://svnweb.freebsd.org/changeset/base/343480 >> >> Log: >> Silence Clang Scan warning about potentially unsafe use of strcpy. >> >> While this is a false positive,

Re: svn commit: r343480 - head/lib/libfigpar

2019-01-26 Thread Rodney W. Grimes
> Author: se > Date: Sat Jan 26 21:30:26 2019 > New Revision: 343480 > URL: https://svnweb.freebsd.org/changeset/base/343480 > > Log: > Silence Clang Scan warning about potentially unsafe use of strcpy. > > While this is a false positive, the use of strdup() simplifies the code. Though

svn commit: r343480 - head/lib/libfigpar

2019-01-26 Thread Stefan Esser
Author: se Date: Sat Jan 26 21:30:26 2019 New Revision: 343480 URL: https://svnweb.freebsd.org/changeset/base/343480 Log: Silence Clang Scan warning about potentially unsafe use of strcpy. While this is a false positive, the use of strdup() simplifies the code. MFC after:2 weeks