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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2017-02-27 at 10:31 +0200, Jonathan Dieter wrote:
> 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 makes
> these tools unbuildable.
> 
> This patch fixes these problems by replacing sprintf() with snprintf() in
> one place and adding checks for the return value of snprintf().
> 
> > Reviewed-by: Peter Senna Tschudin <peter.senna@xxxxxxxxx>
> > Signed-off-by: Jonathan Dieter <jdieter@xxxxxxxxx>
> ---
> Changes since v3
>  * Cast sizeof to long unsigned when printing errors to fix building for 32-bit
>    architectures

Just wanted to check if there's anything else I need to do to make this
ready?

Thanks,
Jonathan
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux