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

Commit c1bf68a8 authored by Jeff Tinker's avatar Jeff Tinker
Browse files

Fix information disclosure in mediadrmserver

Test:POC provided in bug
Bug:79218474
Change-Id: Iba12c07a5e615f8ed234b01ac53e3559ba9ac12e
parent 11eddd5a
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -225,8 +225,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();
        android_errorWriteWithInfoLog(0x534e4554, "62872384", -1, NULL, 0);
    }
}

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