kernel_optimize_test/tools/usb
Colin Ian King e325808c00 usbip: tools: fix atoi() on non-null terminated string
Currently the call to atoi is being passed a single char string
that is not null terminated, so there is a potential read overrun
along the stack when parsing for an integer value.  Fix this by
instead using a 2 char string that is initialized to all zeros
to ensure that a 1 char read into the string is always terminated
with a \0.

Detected by cppcheck:
"Invalid atoi() argument nr 1. A nul-terminated string is required."

Fixes: 3391ba0e27 ("usbip: tools: Extract generic code to be shared with vudc backend")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-18 19:44:39 +02:00
..
ffs-aio-example
usbip usbip: tools: fix atoi() on non-null terminated string 2018-10-18 19:44:39 +02:00
.gitignore
ffs-test.c tools: usb: ffs-test: Fix build on big endian systems 2018-07-17 10:12:51 +03:00
hcd-tests.sh
Makefile
testusb.c