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

Commit 7a9e8dfe authored by Ray Essick's avatar Ray Essick
Browse files

mpeg4enc: fix OOB in RasterIntraUpdate

Change the order of checks to avoid OOB read in intraArray

Bug: 176084648
Test: poc in bug
Change-Id: Id6cf902cb7b386760d5f641f05e99ece91621ec5
Merged-In: Id6cf902cb7b386760d5f641f05e99ece91621ec5
parent 1a44b343
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1576,7 +1576,7 @@ void RasterIntraUpdate(UChar *intraArray, UChar *Mode, Int totalMB, Int numRefre

    /* find the last refresh MB */
    indx = 0;
    while (intraArray[indx] == 1 && indx < totalMB)
    while (indx < totalMB && intraArray[indx] == 1)
        indx++;

    /* add more  */