Prevent buffer overflow in bth_device.c

This commit is contained in:
szymonh 2021-09-12 20:09:58 +02:00
parent 5013788989
commit d5f2c34eaa
1 changed files with 1 additions and 1 deletions

View File

@ -214,7 +214,7 @@ bool btd_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb_control_request_t c
}
else return false;
return tud_control_xfer(rhport, request, &_btd_itf.hci_cmd, request->wLength);
return tud_control_xfer(rhport, request, &_btd_itf.hci_cmd, sizeof(_btd_itf.hci_cmd));
}
else if ( stage == CONTROL_STAGE_DATA )
{