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

Commit c6e0d607 authored by Marco Nelissen's avatar Marco Nelissen Committed by Android (Google) Code Review
Browse files

Merge "Fail gracefully instead of CHECKing"

parents c3b498e1 b3fc6efa
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -4868,7 +4868,9 @@ status_t MPEG4Source::parseClearEncryptedSizes(
        off64_t offset, bool isSubsampleEncryption, uint32_t flags) {

    int32_t ivlength;
    CHECK(AMediaFormat_getInt32(mFormat, AMEDIAFORMAT_KEY_CRYPTO_DEFAULT_IV_SIZE, &ivlength));
    if (!AMediaFormat_getInt32(mFormat, AMEDIAFORMAT_KEY_CRYPTO_DEFAULT_IV_SIZE, &ivlength)) {
        return ERROR_MALFORMED;
    }

    // only 0, 8 and 16 byte initialization vectors are supported
    if (ivlength != 0 && ivlength != 8 && ivlength != 16) {