Commit Graph
2 Commits
Author SHA1 Message Date
Jonathan Dieter e5dfa3f902 usbip: Fix potential format overflow in userspace tools
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 <[email protected]>
Signed-off-by: Jonathan Dieter <[email protected]>
Acked-by: Shuah Khan <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2017-03-17 13:16:56 +09:00
Valentina Manea 588b48caf6 usbip: move usbip userspace code out of staging
At this point, USB/IP userspace code is fully functional
and can be moved out of staging.

Signed-off-by: Valentina Manea <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-08-25 10:38:56 -07:00