commit | cb5058bb6d7133b2f21e6a58bc22c02a150af77c | [log] [tgz] |
---|---|---|
author | Josuah Demangeon <me@josuah.net> | Fri Jul 18 19:11:55 2025 +0000 |
committer | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | Thu Jul 24 15:59:05 2025 +0000 |
tree | 364e47467ae3c52db821783282a02ecf919bdd1e | |
parent | 5489c8f2c8bd454f8f5155af7b34ee4bd12fb472 [diff] |
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: Josuah Demangeon <me@josuah.net> (cherry picked from commit 366c64eca02d38db47e443aee34c4f93f010d5fa)