summaryrefslogtreecommitdiffstats
path: root/media/libstagefright
diff options
context:
space:
mode:
authorJoshua J. Drake <android-open-source@qoop.org>2015-08-04 02:55:59 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-08-04 02:55:59 +0000
commit272f4056162e119db61fb304b01f0152c07b8e02 (patch)
treee218c272dec4246ece29daeaad1d52bee2b2bcdc /media/libstagefright
parent4e44b2ee286bd993210aa81ad20ebbf1d1a816c6 (diff)
parent52302d917b06b11625b9de686153d1e2520f42cd (diff)
downloadframeworks_av-272f4056162e119db61fb304b01f0152c07b8e02.zip
frameworks_av-272f4056162e119db61fb304b01f0152c07b8e02.tar.gz
frameworks_av-272f4056162e119db61fb304b01f0152c07b8e02.tar.bz2
am 52302d91: am f354c48e: am 5c4428f6: Fix integer overflow during MP4 atom processing
* commit '52302d917b06b11625b9de686153d1e2520f42cd': Fix integer overflow during MP4 atom processing
Diffstat (limited to 'media/libstagefright')
-rw-r--r--media/libstagefright/SampleTable.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/media/libstagefright/SampleTable.cpp b/media/libstagefright/SampleTable.cpp
index 1358582..a7ceecb 100644
--- a/media/libstagefright/SampleTable.cpp
+++ b/media/libstagefright/SampleTable.cpp
@@ -230,6 +230,9 @@ status_t SampleTable::setSampleToChunkParams(
return ERROR_MALFORMED;
}
+ if (SIZE_MAX / sizeof(SampleToChunkEntry) <= mNumSampleToChunkOffsets)
+ return ERROR_OUT_OF_RANGE;
+
mSampleToChunkEntries =
new SampleToChunkEntry[mNumSampleToChunkOffsets];