[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] [PATCH] Make memory allocation for device and configuration descriptors dynamic



On 05/10/14 19:34, David Gálvez wrote:
> Hi,
>
> I have seen some device with configuration descriptor bigger than 512
> bytes (size of static buffer in our USB stack), so I've made buffers
> memory allocation for device and configuration descriptors dynamic.
>
> ----------------------------------
>
> Commit message:
>
> Make buffers memory allocation for device and configuration descriptors dynamic.
David,

This doesn't look right.

usb_get_configuration_no() is being passed tmpbuf which is the device
descriptor just been retrieved from usb_get_descriptor(), but now you
are mallocing a 9 byte buffer and won't contain that information.

What was the size of the configuration descriptor you saw ?

Also can we check what Linux does here ?

Alan.