mirror of
https://github.com/espressif/esp-idf.git
synced 2026-09-22 13:01:16 +03:00
fix(bt/bluedroid): added buffer length check for HID host data indication
This commit is contained in:
@@ -766,6 +766,11 @@ static void hidh_l2cif_data_ind (UINT16 l2cap_cid, BT_HDR *p_msg)
|
||||
return;
|
||||
}
|
||||
|
||||
if (p_msg->len < 1) {
|
||||
HIDH_TRACE_WARNING ("HID-Host Rcvd Empty L2CAP data");
|
||||
osi_free (p_msg);
|
||||
return;
|
||||
}
|
||||
|
||||
ttype = HID_GET_TRANS_FROM_HDR(*p_data);
|
||||
param = HID_GET_PARAM_FROM_HDR(*p_data);
|
||||
|
||||
Reference in New Issue
Block a user