Bug 1100176 - Avoiding infinite loops when encountering a sidx box. r=ajones
authorMatt Woodrow <mwoodrow@mozilla.com>
Mon, 17 Nov 2014 15:31:25 +1300
changeset 240271 53ebcaa07a4bad42711a1853716dfdba0124198f
parent 240270 5492e9dc06f1f9d006a7ecdae12f6f9c28087b32
child 240272 f5f0ee65aa5bc03c2eac5007e60073674d246ed0
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersajones
bugs1100176
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1100176 - Avoiding infinite loops when encountering a sidx box. r=ajones
media/libstagefright/frameworks/av/media/libstagefright/MPEG4Extractor.cpp
--- a/media/libstagefright/frameworks/av/media/libstagefright/MPEG4Extractor.cpp
+++ b/media/libstagefright/frameworks/av/media/libstagefright/MPEG4Extractor.cpp
@@ -3606,17 +3606,17 @@ status_t MPEG4Source::fragmentedRead(
                     }
                     uint64_t chunk_size = ntohl(hdr[0]);
                     uint32_t chunk_type = ntohl(hdr[1]);
                     char chunk[5];
                     MakeFourCCString(chunk_type, chunk);
 
                     // If we're pointing to a segment type or sidx box then we skip them.
                     if (chunk_type != FOURCC('m', 'o', 'o', 'f')) {
-                        moofOffset += chunk_size;
+                        mNextMoofOffset += chunk_size;
                         continue;
                     }
                     mCurrentMoofOffset = moofOffset;
                     status_t ret = parseChunk(&moofOffset);
                     if (ret != OK) {
                         return ret;
                     }
                 } while (mCurrentSamples.size() == 0);