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

Commit 1077b7a6 authored by Ray Essick's avatar Ray Essick
Browse files

eliminate CHECK_LE in PlaylistFetcher.cpp

convert a CHECK_LE() consistency test to a return indicating
malformed content. Avoids killing the service

Bug: 132413566
Test: none
parent a5175b7a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2160,7 +2160,9 @@ status_t PlaylistFetcher::extractAndQueueAccessUnits(
            return ERROR_MALFORMED;
        }

        CHECK_LE(offset + aac_frame_length, buffer->size());
        if (aac_frame_length > buffer->size() - offset) {
            return ERROR_MALFORMED;
        }

        int64_t unitTimeUs = timeUs + numSamples * 1000000LL / sampleRate;
        offset += aac_frame_length;