summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2026-06-16 17:36:17 +0700
committerGitHub <[email protected]>2026-06-16 17:36:17 +0700
commit7b791916a702c28f8f39e9bfc5eb8455d0942865 (patch)
treed9e540eac87cb26beb5b14b2aa3d396993a2090e /tools
parent14e20e9f6b592d63bb18eb6fb36f1fd462f4f0a0 (diff)
device: clamp EP0 OUT data copy to the control transfer buffer (#3705)
* device: clamp EP0 OUT data copy to the control transfer buffer usbd_control_xfer_cb() copied xferred_bytes from the EP0 bounce buffer into the requester's buffer with no bound. A non-compliant host that sends an OUT data packet larger than the control transfer's data_len (= min(len, wLength), the buffer capacity) would overflow that buffer and over-count total_xferred. Clamp xferred_bytes to the remaining buffer space before the memcpy and accounting.
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions