From 059c4ed46da09764bd89b15a6a5163c53a42a095 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Fri, 3 Jul 2020 16:04:23 +0200 Subject: [PATCH] Fixed discrepancy in string descriptor default (cherry picked from commit 747513d901ae50c8223a5ddd5b447436bb782a66) --- channels/urbdrc/client/libusb/libusb_udevice.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/channels/urbdrc/client/libusb/libusb_udevice.c b/channels/urbdrc/client/libusb/libusb_udevice.c index 36e667d..c1f4533 100644 --- a/channels/urbdrc/client/libusb/libusb_udevice.c +++ b/channels/urbdrc/client/libusb/libusb_udevice.c @@ -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]; -- 2.7.4