summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/omx/SimpleSoftOMXComponent.cpp
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2016-02-29 12:47:20 -0800
committerThe Android Automerger <android-build@google.com>2016-04-21 19:09:54 -0700
commit295c883fe3105b19bcd0f9e07d54c6b589fc5bff (patch)
tree78e44d1f67000b06f9a621b01e11bb0fa647c59b /media/libstagefright/omx/SimpleSoftOMXComponent.cpp
parentdaa85dac2055b22dabbb3b4e537597e6ab73a866 (diff)
downloadframeworks_av-295c883fe3105b19bcd0f9e07d54c6b589fc5bff.zip
frameworks_av-295c883fe3105b19bcd0f9e07d54c6b589fc5bff.tar.gz
frameworks_av-295c883fe3105b19bcd0f9e07d54c6b589fc5bff.tar.bz2
DO NOT MERGE Verify OMX buffer sizes prior to access
Bug: 27207275 Change-Id: I4412825d1ee233d993af0a67708bea54304ff62d
Diffstat (limited to 'media/libstagefright/omx/SimpleSoftOMXComponent.cpp')
-rw-r--r--media/libstagefright/omx/SimpleSoftOMXComponent.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/media/libstagefright/omx/SimpleSoftOMXComponent.cpp b/media/libstagefright/omx/SimpleSoftOMXComponent.cpp
index e6a0c49..60c1e2e 100644
--- a/media/libstagefright/omx/SimpleSoftOMXComponent.cpp
+++ b/media/libstagefright/omx/SimpleSoftOMXComponent.cpp
@@ -125,6 +125,10 @@ OMX_ERRORTYPE SimpleSoftOMXComponent::internalGetParameter(
OMX_PARAM_PORTDEFINITIONTYPE *defParams =
(OMX_PARAM_PORTDEFINITIONTYPE *)params;
+ if (!isValidOMXParam(defParams)) {
+ return OMX_ErrorBadParameter;
+ }
+
if (defParams->nPortIndex >= mPorts.size()
|| defParams->nSize
!= sizeof(OMX_PARAM_PORTDEFINITIONTYPE)) {
@@ -152,6 +156,10 @@ OMX_ERRORTYPE SimpleSoftOMXComponent::internalSetParameter(
OMX_PARAM_PORTDEFINITIONTYPE *defParams =
(OMX_PARAM_PORTDEFINITIONTYPE *)params;
+ if (!isValidOMXParam(defParams)) {
+ return OMX_ErrorBadParameter;
+ }
+
if (defParams->nPortIndex >= mPorts.size()) {
return OMX_ErrorBadPortIndex;
}