commit | eac781b2bca59f55201e58d8e7ca50ffc664d71a | [log] [tgz] |
---|---|---|
author | Harish Mahendrakar <harish.mahendrakar@ittiam.com> | Mon Dec 14 14:23:52 2020 -0800 |
committer | Ray Essick <essick@google.com> | Sun Jan 17 20:35:14 2021 -0800 |
tree | 1c5a0719174ebb1ce70c98856905abf82ae996be | |
parent | 78b1947ea365fdca2f243657166bc597b2c0081d [diff] |
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
diff --git a/media/codecs/m4v_h263/enc/src/motion_est.cpp b/media/codecs/m4v_h263/enc/src/motion_est.cpp index 997b78d..9deb023 100644 --- a/media/codecs/m4v_h263/enc/src/motion_est.cpp +++ b/media/codecs/m4v_h263/enc/src/motion_est.cpp
@@ -1576,7 +1576,7 @@ /* find the last refresh MB */ indx = 0; - while (intraArray[indx] == 1 && indx < totalMB) + while (indx < totalMB && intraArray[indx] == 1) indx++; /* add more */