Skip to content
Snippets Groups Projects
Commit 8b8d779d authored by Vincent Palatin's avatar Vincent Palatin Committed by Marek Vasut
Browse files

usb: fallback safely when a configuration descriptor is too large


When a USB configuration descriptor was larger than our USB buffer
(512 bytes), we were skipping the full descriptor reading but then we
were still parsing and using it, triggering memory corruptions.
Now in that case, it just skips this device enumeration and displays the
appropriate message to the user, so he can fix the buffer if he wants.

This bug was triggered by some UVC webcams which have very large
configuration descriptors (e.g. a couple of kB) describing all their
supported video encodings.

Signed-off-by: default avatarVincent Palatin <vpalatin@chromium.org>
Acked-by: default avatarSimon Glass <sjg@chromium.org>
parent e81e79ed
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment