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

Commit b535b251 authored by wangxianhong's avatar wangxianhong Committed by xianhong wang
Browse files

BT: fix NPE issue in bt stack.



When the mobile phone is connected to the Bluetooth audio, the Bluetooth is restarted abnormally.

BUG: 247439031
Tag: #stability
Test: Manual - Build Floss on Linux

Signed-off-by: default avatarwangxianhong <wangxianhong@xiaomi.com>
Change-Id: Ie1fc9eb39ae2bc645f2ec96c7a0d7c369d40c02f
parent c028d9a6
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -736,6 +736,10 @@ void l2c_lcc_proc_pdu(tL2C_CCB* p_ccb, BT_HDR* p_buf) {

  } else {
    p_data = p_ccb->ble_sdu;
    if (p_data == NULL) {
      osi_free(p_buf);
      return;
    }
    if (p_buf->len > (p_ccb->ble_sdu_length - p_data->len)) {
      L2CAP_TRACE_ERROR("%s: buffer length=%d too big. max=%d. Dropped",
                        __func__, p_data->len,