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

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

[automerger] SDP: return error on offset bigger than atribute length am:...

[automerger] SDP: return error on offset bigger than atribute length am: 0de61ca6 am: 6ca00472 am: 350d2091 am: 35e27130 am: 11419255 am: 1e124e27 am: ba012f98 am: 18399351

Change-Id: I4d8b0fd5c2b026105e169eb35b3e34de72f5b503
parents 946a4d23 18399351
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -442,6 +442,14 @@ static void process_service_attr_req (tCONN_CB *p_ccb, UINT16 trans_num,
            /* if there is a partial attribute pending to be sent */
            if (p_ccb->cont_info.attr_offset)
            {
                if (attr_len < p_ccb->cont_info.attr_offset)
                {
                    android_errorWriteLog(0x534e4554, "79217770");
                    SDP_TRACE_ERROR("offset is bigger than attribute length");
                    sdpu_build_n_send_error(p_ccb, trans_num, SDP_INVALID_CONT_STATE,
                                            SDP_TEXT_BAD_CONT_LEN);
                    return;
                }
                p_rsp = sdpu_build_partial_attrib_entry (p_rsp, p_attr, rem_len,
                                                         &p_ccb->cont_info.attr_offset);

@@ -694,6 +702,14 @@ static void process_service_search_attr_req (tCONN_CB *p_ccb, UINT16 trans_num,
                /* if there is a partial attribute pending to be sent */
                if (p_ccb->cont_info.attr_offset)
                {
                    if (attr_len < p_ccb->cont_info.attr_offset)
                    {
                        android_errorWriteLog(0x534e4554, "79217770");
                        SDP_TRACE_ERROR("offset is bigger than attribute length");
                        sdpu_build_n_send_error(p_ccb, trans_num, SDP_INVALID_CONT_STATE,
                                                SDP_TEXT_BAD_CONT_LEN);
                        return;
                    }
                    p_rsp = sdpu_build_partial_attrib_entry (p_rsp, p_attr, rem_len,
                                                             &p_ccb->cont_info.attr_offset);