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

Commit 716e56bc 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

am: 124c0903

* commit '124c0903':
  HLS: gracefully handle illegal buffer sizes

Change-Id: Iac95843fb61167e4f19b3ca61e6c0935bdf85868
parents bfc18313 124c0903
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