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

Commit 49fb3c2b authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "L2CAP: Check length for packet before connection complete" into qt-qpr1-dev am: 53822e21

Change-Id: Ide0c9046e4a3ec51b04a23844d7796abb998d76b
parents 0676f287 53822e21
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -97,6 +97,11 @@ void l2c_rcv_acl_data(BT_HDR* p_msg) {
    /* There is a slight possibility (specifically with USB) that we get an */
    /* L2CAP connection request before we get the HCI connection complete.  */
    /* So for these types of messages, hold them for up to 2 seconds.       */
    if (l2cap_len == 0) {
      L2CAP_TRACE_WARNING("received empty L2CAP packet");
      osi_free(p_msg);
      return;
    }
    uint8_t cmd_code;
    STREAM_TO_UINT8(cmd_code, p);