diff options
author | Pete Batard <pbatard@gmail.com> | 2010-07-31 01:54:21 +0100 |
---|---|---|
committer | Pete Batard <pbatard@gmail.com> | 2010-07-31 01:54:21 +0100 |
commit | 48ce4304c8b04fc13f122655d70eb5b1fa3c209d (patch) | |
tree | 219600e263831e651716ca04205f4e815d2cd105 | |
parent | b5820d34ad6fd3fa719d861daa58e25789ccf232 (diff) | |
download | libusb-48ce4304c8b04fc13f122655d70eb5b1fa3c209d.tar.gz |
fixed bad string duplication for WinUSB pathspbr289
-rw-r--r-- | libusb/os/windows_usb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libusb/os/windows_usb.c b/libusb/os/windows_usb.c index 58d3f4c..e33e7f1 100644 --- a/libusb/os/windows_usb.c +++ b/libusb/os/windows_usb.c @@ -1513,9 +1513,9 @@ static int set_device_paths(struct libusb_context *ctx, struct discovered_devs * break; default: // For other devices, the first interface is the same as the device - priv->usb_interface[0].path = malloc(safe_strlen(priv->path)); + priv->usb_interface[0].path = malloc(safe_strlen(priv->path)+1); if (priv->usb_interface[0].path != NULL) { - safe_strcpy(priv->usb_interface[0].path, safe_strlen(priv->path), priv->path); + safe_strcpy(priv->usb_interface[0].path, safe_strlen(priv->path)+1, priv->path); } // The following is needed if we want to API calls to work for both simple // and composite devices, as |