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

Commit 69161983 authored by Jeff Tinker's avatar Jeff Tinker Committed by Vasyl Gello
Browse files

Fix information disclosure in mediadrmserver



Test:POC provided in bug
Bug:79218474
(cherry picked from commit c1bf68a8)

Backported-By: default avatarVasyl Gello <vasek.gello@gmail.com>
Change-Id: Iba12c07a5e615f8ed234b01ac53e3559ba9ac12e
parent 3430c879
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -199,8 +199,13 @@ IMPLEMENT_META_INTERFACE(Crypto, "android.hardware.ICrypto");

void BnCrypto::readVector(const Parcel &data, Vector<uint8_t> &vector) const {
    uint32_t size = data.readInt32();
    vector.insertAt((size_t)0, size);
    data.read(vector.editArray(), size);
    if (vector.insertAt((size_t)0, size) < 0) {
        vector.clear();
    }
    if (data.read(vector.editArray(), size) != NO_ERROR) {
        vector.clear();
        ALOGE("62872384");
    }
}

void BnCrypto::writeVector(Parcel *reply, Vector<uint8_t> const &vector) const {