Add verification that there is enough buffer space for HID OUT control transfer.
This commit is contained in:
@@ -230,6 +230,7 @@ bool hidd_control_request(uint8_t rhport, tusb_control_request_t const * p_reque
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case HID_REQ_CONTROL_SET_REPORT:
|
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);
|
tud_control_xfer(rhport, p_request, p_hid->epout_buf, p_request->wLength);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user