am 17b6f9b0: am 3b042ea5: am 7d62a918: am 14c686c0: am 940189d9: am 475de998: am 47759307: am 17b625b7: Merge "Fix integer overflow during MP4 atom processing" into klp-dev
* commit '17b6f9b0b5c53a46dc1a04162f32d5785e01e58d':
Fix integer overflow during MP4 atom processing
diff --git a/media/libstagefright/SampleTable.cpp b/media/libstagefright/SampleTable.cpp
index b572af3..6030236 100644
--- a/media/libstagefright/SampleTable.cpp
+++ b/media/libstagefright/SampleTable.cpp
@@ -230,6 +230,9 @@
return ERROR_MALFORMED;
}
+ if (SIZE_MAX / sizeof(SampleToChunkEntry) <= mNumSampleToChunkOffsets)
+ return ERROR_OUT_OF_RANGE;
+
mSampleToChunkEntries =
new SampleToChunkEntry[mNumSampleToChunkOffsets];