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

Commit 9c529005 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix OOB in process_l2cap_cmd"

parents ca6ecc9e 25bb5694
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -721,6 +721,10 @@ static void process_l2cap_cmd(tL2C_LCB* p_lcb, uint8_t* p, uint16_t pkt_len) {
#if (L2CAP_NUM_FIXED_CHNLS > 0)
        if (info_type == L2CAP_FIXED_CHANNELS_INFO_TYPE) {
          if (result == L2CAP_INFO_RESP_RESULT_SUCCESS) {
            if (p + L2CAP_FIXED_CHNL_ARRAY_SIZE > p_next_cmd) {
              android_errorWriteLog(0x534e4554, "111215173");
              return;
            }
            memcpy(p_lcb->peer_chnl_mask, p, L2CAP_FIXED_CHNL_ARRAY_SIZE);
          }