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

Commit 75453371 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "SoftVideoDecodeOMXComponent: validate OMX params for dynamic HDR" into main

parents f6eb9450 a542f2c5
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -616,6 +616,10 @@ OMX_ERRORTYPE SoftVideoDecoderOMXComponent::getConfig(
                DescribeHDR10PlusInfoParams* outParams =
                        (DescribeHDR10PlusInfoParams *)params;

                if (!isValidOMXParam(outParams)) {
                    return OMX_ErrorBadParameter;
                }

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

                // If the buffer provided by the client does not have enough
@@ -694,6 +698,10 @@ OMX_ERRORTYPE SoftVideoDecoderOMXComponent::internalSetConfig(
            const DescribeHDR10PlusInfoParams* inParams =
                    (DescribeHDR10PlusInfoParams *)params;

            if (!isValidOMXParam(inParams)) {
                return OMX_ErrorBadParameter;
            }

            if (*frameConfig) {
                // This is a request to append to the current frame config set.
                // For now, we only support kDescribeHdr10PlusInfoIndex, which