mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
fix(bt/bluedroid): added buffer length check for HID Device data indication
This commit is contained in:
@@ -507,6 +507,11 @@ static void hidd_l2cif_data_ind(uint16_t cid, BT_HDR *p_msg)
|
|||||||
osi_free(p_msg);
|
osi_free(p_msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (p_msg->len < 1) {
|
||||||
|
HIDD_TRACE_WARNING ("HID-Device Rcvd Empty L2CAP data");
|
||||||
|
osi_free(p_msg);
|
||||||
|
return;
|
||||||
|
}
|
||||||
msg_type = HID_GET_TRANS_FROM_HDR(*p_data);
|
msg_type = HID_GET_TRANS_FROM_HDR(*p_data);
|
||||||
param = HID_GET_PARAM_FROM_HDR(*p_data);
|
param = HID_GET_PARAM_FROM_HDR(*p_data);
|
||||||
if (msg_type == HID_TRANS_DATA && cid == p_hcon->intr_cid) {
|
if (msg_type == HID_TRANS_DATA && cid == p_hcon->intr_cid) {
|
||||||
|
|||||||
Reference in New Issue
Block a user