Skip to content
  • Vincent Palatin's avatar
    usb: fallback safely when a configuration descriptor is too large · 8b8d779d
    Vincent Palatin authored
    
    
    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>
    8b8d779d