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

Commit 1471e7a1 authored by Robert Shih's avatar Robert Shih Committed by Android (Google) Code Review
Browse files

Merge "MPEG2PSExtractor: check number of bits left before skipping" into mnc-dev

parents d641af3e 9ae62202
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -505,6 +505,10 @@ ssize_t MPEG2PSExtractor::dequeuePES() {
            optional_bytes_remaining -= 3;
        }

        if (br.numBitsLeft() < optional_bytes_remaining * 8) {
            return ERROR_MALFORMED;
        }

        br.skipBits(optional_bytes_remaining * 8);

        // ES data follows.