Hi,

I found a small bug in dfu_util, file main.c function find_dfu_if() line 86:

There a function libusb_get_config_descriptor(dev, cfg_idx, &cfg); is
called without checking the return code. In case it fails cfg is
invalid and will lead to an crash some lines later.

Something like

rc=libusb_get_config_descriptor(dev, cfg_idx, &cfg);
if (rc<0) return rc;
/* in some cases, noticably FreeBSD if uid != 0,
 * the configuration descriptors are empty */

would fix that problem.

Elmi

_______________________________________________
devel mailing list
devel@lists.openmoko.org
https://lists.openmoko.org/mailman/listinfo/devel

Reply via email to