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

Commit 5b4757c2 authored by Edwin Wong's avatar Edwin Wong Committed by Android (Google) Code Review
Browse files

Merge "[DO NOT MERGE] Fix heap buffer overflow in clearkey CryptoPlugin::decrypt" into qt-dev

parents 63a33474 d8191750
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -136,6 +136,8 @@ Return<void> CryptoPlugin::decrypt_1_2(
        return Void();
    }

    base = static_cast<uint8_t *>(static_cast<void *>(destBase->getPointer()));

    if (destBuffer.offset + destBuffer.size > destBase->getSize()) {
        _hidl_cb(Status_V1_2::ERROR_DRM_FRAME_TOO_LARGE, 0, "invalid buffer size");
        return Void();