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

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

DO NOT MERGE Part of fix for libmedia OOB write anywhere

Clarify that decrypt destination is not a pointer for
secure case.

b/23223325

Change-Id: I642dcf790a9eb9e32175f3e0d8f040c82228e3ac
(cherry picked from commit ed555d70)
parent 5aa887ef
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -247,9 +247,9 @@ status_t BnCrypto::onTransact(
                    subSamples,
                    sizeof(CryptoPlugin::SubSample) * numSubSamples);

            void *dstPtr;
            void *secureBufferId, dstPtr;
            if (secure) {
                dstPtr = (void *)data.readIntPtr();
                secureBufferId = (void *)data.readIntPtr();
            } else {
                dstPtr = malloc(totalSize);
            }
@@ -262,7 +262,7 @@ status_t BnCrypto::onTransact(
                    mode,
                    srcData,
                    subSamples, numSubSamples,
                    dstPtr,
                    secure ? secureBufferId : dstPtr,
                    &errorDetailMsg);

            reply->writeInt32(result);