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

Commit 899a582b authored by Wonsik Kim's avatar Wonsik Kim Committed by Android Build Coastguard Worker
Browse files

omx: check HDR10+ info param size

Bug: 329641908
Test: presubmit
Flag: EXEMPT security fix
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:53298956ba6bb8f147a632d7aaed8566dfc203ee)
Merged-In: I72523e1de61e5f947174272b732e170e1c2964df
Change-Id: I72523e1de61e5f947174272b732e170e1c2964df
parent 2c2dd263
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -619,6 +619,13 @@ OMX_ERRORTYPE SoftVideoDecoderOMXComponent::getConfig(
                if (!isValidOMXParam(outParams)) {
                    return OMX_ErrorBadParameter;
                }
                if (offsetof(DescribeHDR10PlusInfoParams, nValue) + outParams->nParamSize >
                    outParams->nSize) {
                    ALOGE("b/329641908: too large param size; nParamSize=%u nSize=%u",
                          outParams->nParamSize, outParams->nSize);
                    android_errorWriteLog(0x534e4554, "329641908");
                    return OMX_ErrorBadParameter;
                }

                outParams->nParamSizeUsed = info->size();