depot/third_party/nixpkgs/pkgs/os-specific/linux/usbip/fix-snprintf-truncation.patch
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

13 lines
513 B
Diff

diff --git a/tools/usb/usbip/libsrc/vhci_driver.c b/tools/usb/usbip/libsrc/vhci_driver.c
index 8159fd98680b..7d6eb3e3fe1e 100644
--- a/tools/usb/usbip/libsrc/vhci_driver.c
+++ b/tools/usb/usbip/libsrc/vhci_driver.c
@@ -111,7 +111,7 @@ static int parse_status(const char *value)
static int refresh_imported_device_list(void)
{
const char *attr_status;
- char status[MAX_STATUS_NAME+1] = "status";
+ char status[MAX_STATUS_NAME+2] = "status";
int i, ret;
for (i = 0; i < vhci_driver->ncontrollers; i++) {