linux-stable/tools
Jonathan Dieter 69e78e7214 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: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-31 12:55:50 +01:00
..
accounting tools: move accounting tool from Documentation 2016-09-23 13:07:15 -06:00
arch KPTI: Rename to PAGE_TABLE_ISOLATION 2018-01-05 15:46:35 +01:00
build tools build: Add feature detection for g++ 2016-10-05 19:59:35 -03:00
cgroup
firewire
gpio tools/gpio: fix gpio-event-mon header comment 2016-08-08 09:50:22 +02:00
hv hv: kvp: Avoid reading past allocated blocks from KVP file 2017-12-14 09:28:11 +01:00
iio Second set of iio new device support, features and cleanups for the 4.9 cycle. 2016-09-14 20:42:03 +02:00
include tools include: Do not use poison with C++ 2017-12-09 22:01:49 +01:00
kvm/kvm_stat
laptop tools: move laptops dslm tool from Documentation 2016-09-23 13:07:21 -06:00
lguest tools/lguest: Don't bork the terminal in case of wrong args 2016-09-08 08:05:24 +02:00
lib tools lib traceevent: Fix prev/next_prio for deadline tasks 2017-08-06 18:59:48 -07:00
net
nfsd
objtool objtool: Improve error message for bad file argument 2018-01-23 19:57:05 +01:00
pcmcia tools: move pcmcia crc32hash tool from Documentation 2016-09-23 13:07:27 -06:00
perf perf tools: Fix build with ARCH=x86_64 2018-01-23 19:57:07 +01:00
power tools/power turbostat: bugfix: GFXMHz column not changing 2017-10-08 10:26:11 +02:00
scripts
spi Merge remote-tracking branches 'spi/topic/ti-qspi', 'spi/topic/tools', 'spi/topic/txx9' and 'spi/topic/xlp' into spi-next 2016-09-30 09:14:22 -07:00
testing selftests/x86: Add test_vsyscall 2018-01-17 09:39:00 +01:00
thermal/tmon
time
usb usbip: Fix potential format overflow in userspace tools 2018-01-31 12:55:50 +01:00
virtio tools/virtio/ringtest: fix run-on-all.sh for offline cpus 2017-01-26 08:24:46 +01:00
vm
Makefile