aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2018-10-16 19:03:43 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-18 19:44:39 +0200
commite325808c0051b16729ffd472ff887c6cae5c6317 (patch)
tree92e61ed3a5bf24684bf64f3746b03c914577eeac /drivers/usb
parentUSB: misc: appledisplay: fix backlight update_status return code (diff)
downloadlinux-dev-e325808c0051b16729ffd472ff887c6cae5c6317.tar.xz
linux-dev-e325808c0051b16729ffd472ff887c6cae5c6317.zip
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: 3391ba0e2792 ("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>
Diffstat (limited to 'drivers/usb')
0 files changed, 0 insertions, 0 deletions