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

Commit 4a8f9e81 authored by Ray Essick's avatar Ray Essick
Browse files

m4v_h263: Add check on the encode dimension

Test: poc in bug description

Bug: 172716941
Bug: 172718133
Bug: 173042552

Merged-In: Id32ee0585a4188f3b303d7f2f83793d7ab8152da
Change-Id: I0426e59a6327338cfc7b03625f24694753b0f1e0
parent 6bb359e9
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];
    }