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

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

Merge "Fix OOB in avct_lcb_msg_asmbl"

parents 90c09c7d 2c8fd5ff
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -53,6 +53,12 @@ static BT_HDR* avct_lcb_msg_asmbl(tAVCT_LCB* p_lcb, BT_HDR* p_buf) {
  uint8_t pkt_type;
  BT_HDR* p_ret;

  if (p_buf->len < 1) {
    osi_free(p_buf);
    p_ret = NULL;
    return p_ret;
  }

  /* parse the message header */
  p = (uint8_t*)(p_buf + 1) + p_buf->offset;
  pkt_type = AVCT_PKT_TYPE(p);