summaryrefslogtreecommitdiff
path: root/src/class
diff options
context:
space:
mode:
authorNathan Conrad <[email protected]>2019-09-12 16:03:45 -0400
committerNathan Conrad <[email protected]>2019-09-12 16:07:12 -0400
commit8cca287683a4376f7483b579dcf36c2d1daf8fab (patch)
tree4b7099446ae8e9592d1543dc02d74b9fb7b3daa3 /src/class
parent340dcb81bfc7074ca01bbee6177ea52562aa3b51 (diff)
Add verification that there is enough buffer space for HID OUT control transfer.
Diffstat (limited to 'src/class')
-rw-r--r--src/class/hid/hid_device.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/class/hid/hid_device.c b/src/class/hid/hid_device.c
index 572f2cad2..7270904ca 100644
--- a/src/class/hid/hid_device.c
+++ b/src/class/hid/hid_device.c
@@ -230,6 +230,7 @@ bool hidd_control_request(uint8_t rhport, tusb_control_request_t const * p_reque
break;
case HID_REQ_CONTROL_SET_REPORT:
+ TU_VERIFY(p_request->wLength <=sizeof(p_hid->epout_buf));
tud_control_xfer(rhport, p_request, p_hid->epout_buf, p_request->wLength);
break;