Re: [PATCH 1/2] Fix format overflows

2017-02-21 Thread Jonathan Dieter
On Tue, 2017-02-21 at 08:48 +0200, Jonathan Dieter wrote: > On Tue, 2017-02-21 at 07:12 +0100, Krzysztof Opasiak wrote: > > Hi, > >   > > W dniu 2017-02-20 o 21:51, Jonathan Dieter pisze:  > > > + err("busid length %i >= SYSFS_BUS_ID_SIZE", > > > size); > > Should I also change the error

Re: [PATCH 1/2] Fix format overflows

2017-02-21 Thread Jonathan Dieter
On Tue, 2017-02-21 at 08:48 +0200, Jonathan Dieter wrote: > On Tue, 2017-02-21 at 07:12 +0100, Krzysztof Opasiak wrote: > > Hi, > >   > > W dniu 2017-02-20 o 21:51, Jonathan Dieter pisze:  > > > + err("busid length %i >= SYSFS_BUS_ID_SIZE", > > > size); > > Should I also change the error

Re: [PATCH 1/2] Fix format overflows

2017-02-20 Thread Jonathan Dieter
Thanks for looking at this. One quick question before I put out version two with your corrections: On Tue, 2017-02-21 at 07:12 +0100, Krzysztof Opasiak wrote: > Hi, >  > W dniu 2017-02-20 o 21:51, Jonathan Dieter pisze: > > The usbip userspace tools call sprintf()/snprintf() and don't check > >

Re: [PATCH 1/2] Fix format overflows

2017-02-20 Thread Jonathan Dieter
Thanks for looking at this. One quick question before I put out version two with your corrections: On Tue, 2017-02-21 at 07:12 +0100, Krzysztof Opasiak wrote: > Hi, >  > W dniu 2017-02-20 o 21:51, Jonathan Dieter pisze: > > The usbip userspace tools call sprintf()/snprintf() and don't check > >

Re: [PATCH 1/2] Fix format overflows

2017-02-20 Thread Krzysztof Opasiak
Hi, W dniu 2017-02-20 o 21:51, Jonathan Dieter pisze: The usbip userspace tools call sprintf()/snprintf() and don't check for the return value which can lead the paths to overflow, truncating the final file in the path. More urgently, GCC 7 now warns that these aren't checked with

Re: [PATCH 1/2] Fix format overflows

2017-02-20 Thread Krzysztof Opasiak
Hi, W dniu 2017-02-20 o 21:51, Jonathan Dieter pisze: The usbip userspace tools call sprintf()/snprintf() and don't check for the return value which can lead the paths to overflow, truncating the final file in the path. More urgently, GCC 7 now warns that these aren't checked with

[PATCH 1/2] Fix format overflows

2017-02-20 Thread Jonathan Dieter
The usbip userspace tools call sprintf()/snprintf() and don't check for the return value which can lead the paths to overflow, truncating the final file in the path. More urgently, GCC 7 now warns that these aren't checked with -Wformat-overflow, and with -Werror enabled in configure.ac, that

[PATCH 1/2] Fix format overflows

2017-02-20 Thread Jonathan Dieter
The usbip userspace tools call sprintf()/snprintf() and don't check for the return value which can lead the paths to overflow, truncating the final file in the path. More urgently, GCC 7 now warns that these aren't checked with -Wformat-overflow, and with -Werror enabled in configure.ac, that