linux/tools
Jonathan Dieter 579a9885cf usbip: Fix potential format overflow in userspace tools
commit e5dfa3f902 upstream.

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>
Acked-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-31 12:06:07 +01:00
..
arch
build
cgroup
firewire
hv hv: kvp: Avoid reading past allocated blocks from KVP file 2017-12-16 10:33:48 +01:00
iio
include tools include: Add a __fallthrough statement 2017-07-15 11:57:47 +02:00
laptop/freefall
lguest
lib tools lib traceevent: Fix prev/next_prio for deadline tasks 2017-08-06 19:19:46 -07:00
net
nfsd
perf perf symbols: Fix symbols__fixup_end heuristic for corner cases 2017-12-20 10:04:56 +01:00
power cpupower: Fix turbo frequency reporting for pre-Sandy Bridge cores 2017-05-14 13:32:54 +02:00
scripts
testing selftests/x86: Add test_vsyscall 2018-01-17 09:35:33 +01:00
thermal/tmon
time
usb usbip: Fix potential format overflow in userspace tools 2018-01-31 12:06:07 +01:00
virtio
vm
Makefile