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

Commit 6fa588c7 authored by Android Build Merger (Role)'s avatar Android Build Merger (Role)
Browse files

[automerger] Fix OOB access in mpeg4/h263 decoder am: ef4ce157 am: 9832a2a3 am: 144ba691

Change-Id: Ie6b0359a394ea7669be0cd7be4f1005c7e8dbb92
parents c9528234 144ba691
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1355,6 +1355,14 @@ PV_STATUS DecodeShortHeader(VideoDecData *video, Vop *currVop)
            int tmpHeight = (tmpDisplayHeight + 15) & -16;
            int tmpWidth = (tmpDisplayWidth + 15) & -16;

            if (tmpWidth > video->width)
            {
                // while allowed by the spec, this decoder does not actually
                // support an increase in size.
                ALOGE("width increase not supported");
                status = PV_FAIL;
                goto return_point;
            }
            if (tmpHeight * tmpWidth > video->size)
            {
                // This is just possibly "b/37079296".