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

Commit ae54f3ab authored by Brian Delwiche's avatar Brian Delwiche Committed by Automerger Merge Worker
Browse files

Merge "Fix OOB in a2dp_vendor_opus_decoder_decode_packet" into udc-dev am: e6ffdf77

parents 008a0d67 e6ffdf77
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -138,6 +138,12 @@ bool a2dp_vendor_opus_decoder_decode_packet(BT_HDR* p_buf) {
                              A2DP_OPUS_DECODE_BUFFER_LENGTH, 0 /* flags */);
      }

      if (ret_val < OPUS_OK) {
        LOG_ERROR("Opus DecodeFrame retry failed with %d, dropping packet",
                  ret_val);
        return false;
      }

      size_t frame_len =
          ret_val * numChannels * sizeof(a2dp_opus_decoder_cb.decode_buf[0]);
      a2dp_opus_decoder_cb.decode_callback(