diff options
author | Julien BOIBESSOT <julien.boibessot@armadeus.com> | 2017-12-05 10:09:04 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-12-08 11:31:20 -0500 |
commit | 82a2b827c96883d8b39a58bba23d222d6b0de7ff (patch) | |
tree | 308c7e3981659127cd99cc61c1e135adbde162fc /tools/usb/usbip/libsrc | |
parent | 62354454625741f0569c2cbe45b2d192f8fd258e (diff) |
tools/usbip: fixes potential (minor) "buffer overflow" (detected on recent gcc with -Werror)
Fixes following build error:
vhci_driver.c: In function 'refresh_imported_device_list':
vhci_driver.c:118:37: error: 'snprintf' output may be truncated before
the last format character [-Werror=format-truncation=]
snprintf(status, sizeof(status), "status.%d", i);
^~~~~~~~~~~
vhci_driver.c:118:4: note: 'snprintf' output between 9 and 18 bytes into
a destination of size 17
snprintf(status, sizeof(status), "status.%d", i);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Signed-off-by: Julien BOIBESSOT <julien.boibessot@armadeus.com>
Acked-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/usb/usbip/libsrc')
-rw-r--r-- | tools/usb/usbip/libsrc/vhci_driver.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/usb/usbip/libsrc/vhci_driver.c b/tools/usb/usbip/libsrc/vhci_driver.c index 8a1cd1616de4..627d1dfc332b 100644 --- a/tools/usb/usbip/libsrc/vhci_driver.c +++ b/tools/usb/usbip/libsrc/vhci_driver.c | |||
@@ -106,7 +106,7 @@ static int parse_status(const char *value) | |||
106 | return 0; | 106 | return 0; |
107 | } | 107 | } |
108 | 108 | ||
109 | #define MAX_STATUS_NAME 16 | 109 | #define MAX_STATUS_NAME 18 |
110 | 110 | ||
111 | static int refresh_imported_device_list(void) | 111 | static int refresh_imported_device_list(void) |
112 | { | 112 | { |