| Summary: | dev-libs/libusb-0.12.X memory corruption | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Nicolas Dufresne <nicolas.dufresne> |
| Component: | [OLD] Core system | Assignee: | Robin Johnson <robbat2> |
| Status: | RESOLVED NEEDINFO | ||
| Severity: | normal | CC: | peter, vapier |
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: | Patch that fixes the memory corruption | ||
|
Description
Nicolas Dufresne
2011-06-03 23:12:06 UTC
Created attachment 275755 [details, diff] Patch that fixes the memory corruption From: http://www.libusb.org/attachment/ticket/11/libusb_memset_altsetting_alloc.patch Thanks for pointing out this patch, assigning to maintainer Comment on attachment 275755 [details, diff]
Patch that fixes the memory corruption
pretty sure this patch is broken. upstream trac is down, so i can't check that.
i think what you actually want is:
ifp = interface->altsetting + interface->num_altsetting;
+ memset(ifp, 0, sizeof(*ifp));
interface->num_altsetting++;
can you test that out with your failing case ?
It would be great to get feedback on this and if SpanKY's patch is needed as opposed the patch from upstream (the Trac works for a long time now) then I'll update the patch attached to the upstream ticket. |