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

Commit 9f954b0b authored by Patrik2 Carlsson's avatar Patrik2 Carlsson Committed by android-build-merger
Browse files

Merge "Avoid parsing CC SEI payload beyond buffer end"

am: 1eb3cb03

* commit '1eb3cb03':
  Avoid parsing CC SEI payload beyond buffer end
parents 2a1f3c80 1eb3cb03
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -256,6 +256,12 @@ bool NuPlayer::CCDecoder::parseSEINalUnit(int64_t timeUs, const uint8_t *data, s
            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;