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

Commit 185542f9 authored by Android Build Merger (Role)'s avatar Android Build Merger (Role)
Browse files

[automerger] DO NOT MERGE - Check SDU lower bound before allocate p_data am: 35f419c7

Change-Id: I51d65f4d9ddba01e86ee88b600e820af4f431415
parents 1f297ff9 35f419c7
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -849,6 +849,14 @@ void l2c_lcc_proc_pdu(tL2C_CCB *p_ccb, BT_HDR *p_buf)
            return;
            return;
        }
        }


        if (sdu_length < p_buf->len) {
            L2CAP_TRACE_ERROR("%s: Invalid sdu_length: %d", __func__, sdu_length);
            android_errorWriteWithInfoLog(0x534e4554, "112321180", -1, NULL, 0);
            /* Discard the buffer */
            osi_free(p_buf);
            return;
        }



        if ((p_data = (BT_HDR *) osi_malloc(L2CAP_MAX_BUF_SIZE)) == NULL)
        if ((p_data = (BT_HDR *) osi_malloc(L2CAP_MAX_BUF_SIZE)) == NULL)
        {
        {