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

Commit 9d8fd778 authored by Keith Mok's avatar Keith Mok Committed by Android Build Coastguard Worker
Browse files

DO NOT MERGE - Revert "Add length check when copy AVDTP packet"

This reverts commit ed9a843c.

Reason for revert: partial fix with memory leak regression

Bug: 232023771
Test: manual
Change-Id: Id37da8f8ceeaada7c54d42cdbcd2b7a830be6199
(cherry picked from commit 31035a7559a8ea473b68493ae390d72525d6d4f9)
Merged-In: Id37da8f8ceeaada7c54d42cdbcd2b7a830be6199
parent 81c7d1d8
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -1252,10 +1252,6 @@ BT_HDR* avdt_msg_asmbl(AvdtpCcb* p_ccb, BT_HDR* p_buf) {
     * would have allocated smaller buffer.
     */
    p_ccb->p_rx_msg = (BT_HDR*)osi_malloc(BT_DEFAULT_BUFFER_SIZE);
    if (sizeof(BT_HDR) + p_buf->offset + p_buf->len > BT_DEFAULT_BUFFER_SIZE) {
      android_errorWriteLog(0x534e4554, "232023771");
      return NULL;
    }
    memcpy(p_ccb->p_rx_msg, p_buf, sizeof(BT_HDR) + p_buf->offset + p_buf->len);

    /* Free original buffer */