summaryrefslogtreecommitdiffstats
path: root/media/libmedia
diff options
context:
space:
mode:
authorJeff Tinker <jtinker@google.com>2015-08-19 22:34:50 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-08-19 22:34:50 +0000
commit3cef9257c9ed5ffaa507f8c27bfcae19cc6b96bd (patch)
treeb39ff346ae364299dfd9127a5a03ad215a366fd8 /media/libmedia
parentf271ddd4fece6fcdccf3fc2707e35bed66ac4ca1 (diff)
parented555d70d80964f40563d89a4e6d6a80f83f4b89 (diff)
downloadframeworks_av-3cef9257c9ed5ffaa507f8c27bfcae19cc6b96bd.zip
frameworks_av-3cef9257c9ed5ffaa507f8c27bfcae19cc6b96bd.tar.gz
frameworks_av-3cef9257c9ed5ffaa507f8c27bfcae19cc6b96bd.tar.bz2
Merge "Part of fix for libmedia OOB write anywhere" into mnc-dev
Diffstat (limited to 'media/libmedia')
-rw-r--r--media/libmedia/ICrypto.cpp6
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);
}