summaryrefslogtreecommitdiff
path: root/libusb/os/windows_usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'libusb/os/windows_usb.c')
-rw-r--r--libusb/os/windows_usb.c4
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