diff options
author | Wei Jia <wjia@google.com> | 2015-10-06 02:55:19 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-10-06 02:55:19 +0000 |
commit | b90b8291e36ae079ac0ccd029bb6e6a987036f7c (patch) | |
tree | 973ea7078c95ed0d8d029fd1dffa3ddbe6fd2528 /media/libmedia | |
parent | ee481c9b172f90f507d505c9b32620cc1d062c83 (diff) | |
parent | cb70fdbe9be14002a4303a93f07a13c508c00d89 (diff) | |
download | frameworks_av-b90b8291e36ae079ac0ccd029bb6e6a987036f7c.zip frameworks_av-b90b8291e36ae079ac0ccd029bb6e6a987036f7c.tar.gz frameworks_av-b90b8291e36ae079ac0ccd029bb6e6a987036f7c.tar.bz2 |
am cb70fdbe: Merge "OMX: allow only secure codec to remotely call allocateBuffer." into mnc-dev
* commit 'cb70fdbe9be14002a4303a93f07a13c508c00d89':
OMX: allow only secure codec to remotely call allocateBuffer.
Diffstat (limited to 'media/libmedia')
-rw-r--r-- | media/libmedia/IOMX.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/media/libmedia/IOMX.cpp b/media/libmedia/IOMX.cpp index 16da65e..5423c2a 100644 --- a/media/libmedia/IOMX.cpp +++ b/media/libmedia/IOMX.cpp @@ -963,6 +963,12 @@ status_t BnOMX::onTransact( node_id node = (node_id)data.readInt32(); OMX_U32 port_index = data.readInt32(); + if (!isSecure(node) || port_index != 0 /* kPortIndexInput */) { + ALOGE("b/24310423"); + reply->writeInt32(INVALID_OPERATION); + return NO_ERROR; + } + size_t size = data.readInt64(); buffer_id buffer; |