Fixed discrepancy in string descriptor default
authorakallabeth <akallabeth@posteo.net>
Fri, 3 Jul 2020 14:04:23 +0000 (16:04 +0200)
committerakallabeth <akallabeth@posteo.net>
Tue, 7 Jul 2020 08:44:12 +0000 (10:44 +0200)
(cherry picked from commit 747513d901ae50c8223a5ddd5b447436bb782a66)

channels/urbdrc/client/libusb/libusb_udevice.c

index 36e667d..c1f4533 100644 (file)
@@ -805,7 +805,7 @@ static UINT32 libusb_udev_control_query_device_text(IUDEVICE* idev, UINT32 TextT
                                           "%s [%d], iProduct: %" PRIu8 "!",
                                           msg, ret, devDescriptor->iProduct);
 
-                               len = strnlen(strDesc, MIN(sizeof(strDesc), inSize));
+                               len = MIN(sizeof(strDesc), inSize);
                                for (i = 0; i < len; i++)
                                        text[i] = (WCHAR)strDesc[i];