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

From: Jonathan Dieter
Date: Thu Mar 16 2017 - 03:57:03 EST


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