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

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

Fix information disclosure in mediadrmserver DO NOT MERGE

Test:POC provided in bug
Bug:79218474
Change-Id: Ida9323dc1939e3c6e9fffe302bc8284d181817a7
parent d1fd0276
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();
        android_errorWriteWithInfoLog(0x534e4554, "62872384", -1, NULL, 0);
    }
}

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