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

Commit 124c0903 authored by Robert Shih's avatar Robert Shih Committed by android-build-merger
Browse files

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

am: c3ae7ae5

* commit 'c3ae7ae5':
  HLS: gracefully handle illegal buffer sizes

Change-Id: I487cc7eb1d2c8f2397a06fdd6ac9e583040e13f8
parents 5f9a7eb4 c3ae7ae5
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