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>
This commit is contained in:
Julien BOIBESSOT 2017-12-05 16:09:04 +01:00 committed by Greg Kroah-Hartman
parent 6235445462
commit 82a2b827c9
1 changed files with 1 additions and 1 deletions

View File

@ -106,7 +106,7 @@ static int parse_status(const char *value)
return 0;
}
#define MAX_STATUS_NAME 16
#define MAX_STATUS_NAME 18
static int refresh_imported_device_list(void)
{