Skip to content

Commit

Permalink
omx: check HDR10+ info param size
Browse files Browse the repository at this point in the history
Bug: 329641908
Test: presubmit
Flag: EXEMPT security fix
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:53298956ba6bb8f147a632d7aaed8566dfc203ee)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:f816148a719d2a3bbf432f11da98b3d5fa7de74f)
Merged-In: I72523e1de61e5f947174272b732e170e1c2964df
Change-Id: I72523e1de61e5f947174272b732e170e1c2964df
  • Loading branch information
Wonsik Kim authored and aoleary committed Sep 17, 2024
1 parent 90ef386 commit c0db081
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions media/libstagefright/omx/SoftVideoDecoderOMXComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit c0db081

Please sign in to comment.