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
return LIBUSB_ERROR_IO;
if (tbuf[0] > r)
- return LIBUSB_ERROR_IO;
+ tbuf[0] = r;
di = 0;
for (si = 2; si < tbuf[0]; si += 2) {
--
2.17.0
wspan='2'>
index : guix | |
Wojtek's customized Guix | |
Age | Commit message (Expand) | Author |
49b9'>root/gnu/packages/patches/gcc-5-fix-powerpc64le-build.patchAge | Commit message (Expand) | Author |
2021-11-11 | gnu: gcc-5: Fix powerpc64le-linux build...GCC 5 has a misaligned access to a vector pointer which causes a build failure
when using GCC 8 and later. Backport upstream fix that was applied on the GCC
6 branch.
* gnu/packages/gcc.scm (gcc-5)[source]: Apply
gcc-5-fix-powerpc64le-build.patch.
* gnu/packages/patches/gcc-5-fix-powerpc64le-build.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
| Thiago Jung Bauermann |