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

Commit 4e70ae10 authored by Neelkamal Semwal's avatar Neelkamal Semwal Committed by Ray Essick
Browse files

m4v_h263: Add check on the encode dimension

Test: poc in bug description

Bug: 172716941
Bug: 172718133
Bug: 173042552

Change-Id: Id32ee0585a4188f3b303d7f2f83793d7ab8152da
parent 1132e125
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -491,6 +491,9 @@ OSCL_EXPORT_REF Bool PVInitVideoEncoder(VideoEncControls *encoderControl, Vid
    }
    for (i = 0; i < encParams->nLayers; i++)
    {
        if (encOption->encHeight[i] == 0 || encOption->encWidth[i] == 0 ||
                encOption->encHeight[i] % 16 != 0 || encOption->encWidth[i] % 16 != 0)
            goto CLEAN_UP;
        encParams->LayerHeight[i] = encOption->encHeight[i];
        encParams->LayerWidth[i] = encOption->encWidth[i];
    }