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

Commit 309fbe09 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "OMX: Ensure nStride, if very negative, does not cause an overflow"

parents 03baf11f f4a6c2b3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -502,7 +502,8 @@ OMX_ERRORTYPE SoftVideoDecoderOMXComponent::internalSetParameter(
            // These values were chosen to prevent integer overflows further down the line, and do
            // not indicate support for 32kx32k video.
            if (newWidth > 32768 || newHeight > 32768
                    || video_def->nStride > 32768 || video_def->nSliceHeight > 32768) {
                    || video_def->nStride > 32768 || video_def->nStride < -32768
                    || video_def->nSliceHeight > 32768) {
                ALOGE("b/22885421");
                return OMX_ErrorBadParameter;
            }