Bug 1171067 - Properly read 64bits header's size. r=kentuckyfriedtakahe, a=lizzard
authorJean-Yves Avenard <jyavenard@mozilla.com>
Wed, 10 Jun 2015 19:38:13 +1000
changeset 275054 cb88dde640aa1b55d9ed030c6a8674c611745386
parent 275053 0dcce98d251cecc04050c023c6aea6270346598f
child 275055 1939e93908b290532cc132959f5efa8b53afd113
push id863
push userraliiev@mozilla.com
push dateMon, 03 Aug 2015 13:22:43 +0000
treeherdermozilla-release@f6321b14228d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskentuckyfriedtakahe, lizzard
bugs1171067
milestone40.0a2
Bug 1171067 - Properly read 64bits header's size. r=kentuckyfriedtakahe, a=lizzard
media/libstagefright/binding/Box.cpp
--- a/media/libstagefright/binding/Box.cpp
+++ b/media/libstagefright/binding/Box.cpp
@@ -66,17 +66,17 @@ Box::Box(BoxContext* aContext, uint64_t 
 
   uint64_t size = BigEndian::readUint32(header);
   if (size == 1) {
     uint8_t bigLength[8];
     MediaByteRange bigLengthRange(headerRange.mEnd,
                                   headerRange.mEnd + sizeof(bigLength));
     if ((mParent && !mParent->mRange.Contains(bigLengthRange)) ||
         !byteRange->Contains(bigLengthRange) ||
-        !mContext->mSource->CachedReadAt(aOffset, bigLength,
+        !mContext->mSource->CachedReadAt(aOffset + 8, bigLength,
                                          sizeof(bigLength), &bytes) ||
         bytes != sizeof(bigLength)) {
       return;
     }
     size = BigEndian::readUint64(bigLength);
     mBodyOffset = bigLengthRange.mEnd;
   } else {
     mBodyOffset = headerRange.mEnd;