diff options
| author | Nathan Conrad <[email protected]> | 2019-09-12 16:03:45 -0400 |
|---|---|---|
| committer | Nathan Conrad <[email protected]> | 2019-09-12 16:07:12 -0400 |
| commit | 8cca287683a4376f7483b579dcf36c2d1daf8fab (patch) | |
| tree | 4b7099446ae8e9592d1543dc02d74b9fb7b3daa3 /src | |
| parent | 340dcb81bfc7074ca01bbee6177ea52562aa3b51 (diff) | |
Add verification that there is enough buffer space for HID OUT control transfer.
Diffstat (limited to 'src')
| -rw-r--r-- | src/class/hid/hid_device.c | 1 |
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;
|
