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

Commit dd665ff2 authored by Neel Mehta's avatar Neel Mehta Committed by Android (Google) Code Review
Browse files

Merge "Check for out of bounds reads in ESQueue. Bug: 23221340"

parents 10cf816f 4d344327
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1120,6 +1120,10 @@ sp<ABuffer> ElementaryStreamQueue::dequeueAccessUnitMPEGVideo() {
        }

        if (mFormat != NULL && currentStartCode == 0xb8) {
            if (offset + 7 <= size) {
                ALOGE("Size too small");
                return NULL;
            }
            // GOP layer
            gopFound = true;
            isClosedGop = (data[offset + 7] & 0x40) != 0;