提交 82a2b827 编写于 作者: J Julien BOIBESSOT 提交者: Greg Kroah-Hartman

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: NJulien BOIBESSOT <julien.boibessot@armadeus.com>
Acked-by: NShuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 62354454
...@@ -106,7 +106,7 @@ static int parse_status(const char *value) ...@@ -106,7 +106,7 @@ static int parse_status(const char *value)
return 0; return 0;
} }
#define MAX_STATUS_NAME 16 #define MAX_STATUS_NAME 18
static int refresh_imported_device_list(void) static int refresh_imported_device_list(void)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册