reopen 294139 tags 294139 - sid thanks
Brian Ristuccia wrote:
At any rate, your experimental code seems to allow interoperability with kernels that don't pass back all of the descriptor info. The lsusb -v output is now plausible and rudimentary testing with various userspace programs requiring libusb is successful.
Well done.
Good that it work. I have just uploaded a new version with the patch. In case you need it, please find it below. It should apply to CVS, version 0.1.9 and version 0.1.8 (with maybe a few lines offset). I have also send it to the upstream author.
Steve, is it possible to upload a fixed version directly to Sarge? The current version in Sid is affected by another RC bug (#294368), and thus this fix can't propagate to Sarge until #294368 is fixed. I hope it will be fixed soon, it is in the first position of my TODO list.
Bye, Aurelien
Index: linux.c
===================================================================
RCS file: /cvsroot/libusb/libusb/linux.c,v
retrieving revision 1.66
diff -u -d -p -r1.66 linux.c
--- linux.c 3 Feb 2005 19:11:25 -0000 1.66
+++ linux.c 9 Feb 2005 15:10:04 -0000
@@ -452,7 +452,8 @@ int usb_os_find_devices(struct usb_bus *
else
fprintf(stderr, "Config descriptor too short (expected %d, got %d)\n", 8, ret);
}
-
+ free(dev->config);
+ dev->config = NULL;
goto err;
}
@@ -462,6 +463,8 @@ int usb_os_find_devices(struct usb_bus * if (!bigbuffer) { if (usb_debug >= 1) fprintf(stderr, "Unable to allocate memory for descriptors\n"); + free(dev->config); + dev->config = NULL; goto err; }
@@ -476,8 +479,9 @@ int usb_os_find_devices(struct usb_bus *
else
fprintf(stderr, "Config descriptor too short (expected %d, got %d)\n", desc->wTotalLength, ret);
}
-
free(bigbuffer);
+ free(dev->config);
+ dev->config = NULL;
goto err;
}
-- .''`. Aurelien Jarno GPG: 1024D/F1BCDB73 : :' : Debian GNU/Linux developer | Electrical Engineer `. `' [EMAIL PROTECTED] | [EMAIL PROTECTED] `- people.debian.org/~aurel32 | www.aurel32.net
-- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]