The patch applied is actually very wrong. And it breaks for example gnokii. If you look at the code you find this:
interface->altsetting = realloc(interface->altsetting, sizeof(struct usb_interface_descriptor) * (interface->num_altsetting + 1));
Which means that the structure is reallocated to add new altsetting. If you then zero the whole altsetting you zero all previous altsetting. What about zeroing just allocated space? Please see the attached patch (untested).
The patch applied is actually very wrong. And it breaks for example gnokii.
If you look at the code you find this:
interface- >altsetting = realloc( interface- >altsetting, sizeof(struct usb_interface_ descriptor) * (interface- >num_altsetting + 1));
Which means that the structure is reallocated to add new altsetting. If you then zero the whole altsetting you zero all previous altsetting. What about zeroing just allocated space? Please see the attached patch (untested).