summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei Jia <wjia@google.com>2015-06-10 23:11:27 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-06-10 23:11:27 +0000
commitf19acf4848393acb40ef314e1a7add45e0120011 (patch)
tree8d7414bff1dbbd74049e4afa6b2e64454ed3d749
parent490291898a295221b55cb44f062ec0aadeed19db (diff)
parent66b91b348d66102c8deb652929150446223ec767 (diff)
downloadframeworks_av-f19acf4848393acb40ef314e1a7add45e0120011.zip
frameworks_av-f19acf4848393acb40ef314e1a7add45e0120011.tar.gz
frameworks_av-f19acf4848393acb40ef314e1a7add45e0120011.tar.bz2
am 66b91b34: am e6382cb0: am 115e995c: resolved conflicts for merge of 1f44d837 to lmp-dev
* commit '66b91b348d66102c8deb652929150446223ec767': Fix integer overflow when handling MPEG4 tx3g atom
-rw-r--r--media/libstagefright/MPEG4Extractor.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/media/libstagefright/MPEG4Extractor.cpp b/media/libstagefright/MPEG4Extractor.cpp
index 613f0bc..ffeb579 100644
--- a/media/libstagefright/MPEG4Extractor.cpp
+++ b/media/libstagefright/MPEG4Extractor.cpp
@@ -1893,6 +1893,10 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
size = 0;
}
+ if (SIZE_MAX - chunk_size <= size) {
+ return ERROR_MALFORMED;
+ }
+
uint8_t *buffer = new (std::nothrow) uint8_t[size + chunk_size];
if (buffer == NULL) {
return ERROR_MALFORMED;