2018-05-23 15:23:01 +02:00
|
|
|
diff --git a/libusb/descriptor.c b/libusb/descriptor.c
|
|
|
|
index 74d6de5..0b0e314 100644
|
|
|
|
--- a/libusb/descriptor.c
|
|
|
|
+++ b/libusb/descriptor.c
|
|
|
|
@@ -1174,7 +1174,7 @@ int API_EXPORTED libusb_get_string_descriptor_ascii(libusb_device_handle *dev_ha
|
2016-03-03 18:08:32 +01:00
|
|
|
return LIBUSB_ERROR_IO;
|
|
|
|
|
|
|
|
if (tbuf[0] > r)
|
|
|
|
- return LIBUSB_ERROR_IO;
|
2018-03-29 12:24:58 +02:00
|
|
|
+ tbuf[0] = r;
|
2016-03-03 18:08:32 +01:00
|
|
|
|
2018-03-29 12:24:58 +02:00
|
|
|
di = 0;
|
|
|
|
for (si = 2; si < tbuf[0]; si += 2) {
|
2018-05-23 15:23:01 +02:00
|
|
|
--
|
|
|
|
2.17.0
|
|
|
|
|