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

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

Don't deref a NULL shared buffer base

bug:34624618
Change-Id: I5caee20a944d0c7b5d30f8abdbd8734507914a3a
parent a35e6e82
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -62,6 +62,11 @@ namespace implementation {
            const DestinationBuffer& destination,
            decrypt_cb _hidl_cb) {

        if (mSharedBufferBase == NULL) {
            _hidl_cb(Status::BAD_VALUE, 0, "decrypt buffer base not set");
            return Void();
        }

        android::CryptoPlugin::Mode legacyMode;
        switch(mode) {
        case Mode::UNENCRYPTED: