lkml.org 
[lkml]   [2017]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v4 1/2] usbip: Fix-format-overflow
From
Date
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@gmail.com>
> > Signed-off-by: Jonathan Dieter <jdieter@lesbg.com>
> ---
> 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

\
 
 \ /
  Last update: 2017-03-16 08:57    [W:1.482 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site