libre: Add patch for Axoloti's libusb.
[software/guix-rekado.git] / libre / libusb-for-axoloti.patch
1 diff -rp -u4 libusb-1.0.19-orig/libusb/descriptor.c libusb-1.0.19/libusb/descriptor.c
2 --- libusb-1.0.19-orig/libusb/descriptor.c 2015-05-12 00:15:19 +0200
3 +++ libusb-1.0.19/libusb/descriptor.c 2015-05-12 00:17:09 +0200
4 @@ -1181,9 +1181,9 @@ int API_EXPORTED libusb_get_string_descr
5 if (tbuf[1] != LIBUSB_DT_STRING)
6 return LIBUSB_ERROR_IO;
7
8 if (tbuf[0] > r)
9 - return LIBUSB_ERROR_IO;
10 + tbuf[0] = r;
11
12 for (di = 0, si = 2; si < tbuf[0]; si += 2) {
13 if (di >= (length - 1))
14 break;