Skip to content
Commit 366c64ec authored by Josuah Demangeon's avatar Josuah Demangeon Committed by Fabio Baltieri
Browse files

usb: uvc: respect setup->wLength in responses



Due to the alignment and granularity requirements of memory allocation,
setup->wLength is shorter than the allocated buffer size.
This lead to responses larger than what the host requested, which it
rejected. Fix it by using the minimum between the allocated size, the
struct size, and the wLength requested.

Signed-off-by: default avatarJosuah Demangeon <me@josuah.net>
parent ed9327de
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment