Add verification that there is enough buffer space for HID OUT control transfer.

This commit is contained in:
Nathan Conrad 2019-09-12 16:03:45 -04:00
parent 340dcb81bf
commit 8cca287683

View File

@ -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;