diff options
author | Jeff Tinker <jtinker@google.com> | 2015-08-17 17:57:47 -0700 |
---|---|---|
committer | Jeff Tinker <jtinker@google.com> | 2015-08-17 17:57:47 -0700 |
commit | ed555d70d80964f40563d89a4e6d6a80f83f4b89 (patch) | |
tree | 5ba2d876caa6427dbc1ce3e3850b256d95ed797a /media/libmedia/ICrypto.cpp | |
parent | 39ff8149466ee8e86c0336f706cd4dd3713f359f (diff) | |
download | frameworks_av-ed555d70d80964f40563d89a4e6d6a80f83f4b89.zip frameworks_av-ed555d70d80964f40563d89a4e6d6a80f83f4b89.tar.gz frameworks_av-ed555d70d80964f40563d89a4e6d6a80f83f4b89.tar.bz2 |
Part of fix for libmedia OOB write anywhere
Clarify that decrypt destination is not a pointer for
secure case.
b/23223325
Change-Id: I642dcf790a9eb9e32175f3e0d8f040c82228e3ac
Diffstat (limited to 'media/libmedia/ICrypto.cpp')
-rw-r--r-- | media/libmedia/ICrypto.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/media/libmedia/ICrypto.cpp b/media/libmedia/ICrypto.cpp index 2f440fe..947294f 100644 --- a/media/libmedia/ICrypto.cpp +++ b/media/libmedia/ICrypto.cpp @@ -293,9 +293,9 @@ status_t BnCrypto::onTransact( subSamples, sizeof(CryptoPlugin::SubSample) * numSubSamples); - void *dstPtr; + void *secureBufferId, *dstPtr; if (secure) { - dstPtr = reinterpret_cast<void *>(static_cast<uintptr_t>(data.readInt64())); + secureBufferId = reinterpret_cast<void *>(static_cast<uintptr_t>(data.readInt64())); } else { dstPtr = malloc(totalSize); } @@ -313,7 +313,7 @@ status_t BnCrypto::onTransact( mode, sharedBuffer, offset, subSamples, numSubSamples, - dstPtr, + secure ? secureBufferId : dstPtr, &errorDetailMsg); } |