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

Commit 1eb3cb03 authored by Marco Nelissen's avatar Marco Nelissen Committed by Gerrit Code Review
Browse files

Merge "Avoid parsing CC SEI payload beyond buffer end"

parents ebc0faff 303a2c2b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -235,6 +235,12 @@ bool NuPlayer::CCDecoder::parseSEINalUnit(
            payload_size += last_byte;
        } while (last_byte == 0xFF);

        if (payload_size > SIZE_MAX / 8
                || !br.atLeastNumBitsLeft(payload_size * 8)) {
            ALOGV("Malformed SEI payload");
            break;
        }

        // sei_payload()
        if (payload_type == 4) {
            bool isCC = false;