summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorszymonh <[email protected]>2021-09-12 20:09:58 +0200
committerszymonh <[email protected]>2021-09-12 20:24:54 +0200
commitd5f2c34eaa3e840b32817829031b95c6b7780314 (patch)
tree626bb404509ba759db62e8247b34c3ecfa08ea94 /src
parent501378898970adfe5f84885c12059c3ae8ee8b08 (diff)
Prevent buffer overflow in bth_device.c
Diffstat (limited to 'src')
-rwxr-xr-xsrc/class/bth/bth_device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/class/bth/bth_device.c b/src/class/bth/bth_device.c
index 1d27ae7c5..09fab953e 100755
--- a/src/class/bth/bth_device.c
+++ b/src/class/bth/bth_device.c
@@ -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 )
{