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

Commit 7ef02049 authored by Android Build Merger (Role)'s avatar Android Build Merger (Role)
Browse files

[automerger] Fix copy length calculation in sdp_copy_raw_data am: c4cfe6c8...

[automerger] Fix copy length calculation in sdp_copy_raw_data am: c4cfe6c8 am: c8f26d02 am: 66b26591 am: 0ad9fad0

Change-Id: I37cb9240f3e471768d454e41a37143f16bd4f4e7
parents 40f2aeb3 0ad9fad0
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -377,8 +377,15 @@ static void sdp_copy_raw_data (tCONN_CB *p_ccb, BOOLEAN offset)


        if(offset)
        if(offset)
        {
        {
            cpy_len -= 1;
            type = *p++;
            type = *p++;
            uint8_t* old_p = p;
            p = sdpu_get_len_from_type (p, type, &list_len);
            p = sdpu_get_len_from_type (p, type, &list_len);
            if ((int)cpy_len < (p - old_p)) {
                SDP_TRACE_WARNING("%s: no bytes left for data", __func__);
                return;
            }
            cpy_len -= (p - old_p);
        }
        }
        if(list_len < cpy_len )
        if(list_len < cpy_len )
        {
        {