Skip to content
Snippets Groups Projects
Commit eaf3e613 authored by Julius Werner's avatar Julius Werner Committed by Marek Vasut
Browse files

usb: Use well-known descriptor sizes when parsing configuration


The existing USB configuration parsing code relies on the descriptors'
own length values when reading through the configuration blob. Since the
size of those descriptors is always well-defined, we should rather use
the known sizes instead of trusting device-provided values to be
correct. Also adds some safety to potential out-of-order descriptors.

Change-Id: I16f69dfdd6793aa0fe930b5148d4521f3e5c3090
Signed-off-by: default avatarJulius Werner <jwerner@chromium.org>
parent 1572eadf
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