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

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

Merge "HLS: gracefully handle illegal buffer sizes" into nyc-dev

parents 613aae14 fbe6a51d
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -355,7 +355,11 @@ status_t PlaylistFetcher::decryptBuffer(
    if (!n) {
        return OK;
    }
    CHECK(n % 16 == 0);

    if (n < 16 || n % 16) {
        ALOGE("not enough or trailing bytes (%zu) in encrypted buffer", n);
        return ERROR_MALFORMED;
    }

    if (first) {
        // If decrypting the first block in a file, read the iv from the manifest