Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7f913e04 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix OOB in hidd_l2cif_data_ind"

parents 22ab2411 fab4a492
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -614,6 +614,12 @@ static void hidd_l2cif_data_ind(uint16_t cid, BT_HDR* p_msg) {

  HIDD_TRACE_EVENT("%s: cid=%04x", __func__, cid);

  if (p_msg->len < 1) {
    HIDD_TRACE_ERROR("Invalid data length, ignore");
    osi_free(p_msg);
    return;
  }

  p_hcon = &hd_cb.device.conn;

  if (p_hcon->conn_state == HID_CONN_STATE_UNUSED ||