Re: [PATCH v2 1/2] usbip: Fix-format-overflow

2017-02-22 Thread Jonathan Dieter
On Wed, 2017-02-22 at 06:49 +0100, Krzysztof Opasiak wrote: > Hi, > > W dniu 2017-02-21 o 18:57, Jonathan Dieter pisze: > >   char busid[SYSFS_BUS_ID_SIZE]; > > + unsigned int size; > > I'm not really convinced to use unsigned here. snprintf() is declared > to  > return signed integer so we

Re: [PATCH v2 1/2] usbip: Fix-format-overflow

2017-02-21 Thread Krzysztof Opasiak
Hi, W dniu 2017-02-21 o 18:57, 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