commit | 7a9e8dfebb30d9c864122b52c44d75692e3ad65b | [log] [tgz] |
---|---|---|
author | Ray Essick <essick@google.com> | Tue Jan 26 16:53:28 2021 -0800 |
committer | Ray Essick <essick@google.com> | Tue Jan 26 16:53:28 2021 -0800 |
tree | 2e9859dc2ecd68421ff0c73a62e804f36882cc38 | |
parent | 1a44b3437ee71b8b2383a01758c3dba26ada1049 [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 Merged-In: Id6cf902cb7b386760d5f641f05e99ece91621ec5
diff --git a/media/libstagefright/codecs/m4v_h263/enc/src/motion_est.cpp b/media/libstagefright/codecs/m4v_h263/enc/src/motion_est.cpp index 997b78d..9deb023 100644 --- a/media/libstagefright/codecs/m4v_h263/enc/src/motion_est.cpp +++ b/media/libstagefright/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 */