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

Commit ab614b21 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Crash by invalid ac4 field of mp4 file in fuzzy test" into rvc-dev am:...

Merge "Crash by invalid ac4 field of mp4 file in fuzzy test" into rvc-dev am: bc9c9b7b am: 7706648f am: 86720f91 am: 72d93207

Change-Id: Iba7a533b01726406303ffb70afb3fb2059bbc64c
parents 3f5776cb 72d93207
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -600,6 +600,10 @@ bool AC4DSIParser::parse() {
        if (ac4_dsi_version == 1) {
            uint64_t end = (mDSISize - mBitReader.numBitsLeft()) / 8;
            uint64_t presentation_bytes = end - start;
            if (pres_bytes < presentation_bytes) {
                ALOGE("pres_bytes is smaller than presentation_bytes.");
                return false;
            }
            uint64_t skip_bytes = pres_bytes - presentation_bytes;
            ALOGV("skipping = %" PRIu64 " bytes", skip_bytes);
            CHECK_BITS_LEFT(skip_bytes * 8);