summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei Jia <wjia@google.com>2017-03-24 14:04:05 -0700
committerAndreas Blaesius <skate4life@gmx.de>2017-09-17 22:11:13 +0200
commit16c6f1a2863cd51398f92a22c6980690e98329d8 (patch)
tree04a29d0e419fabef2a78d2395791ab5fdb63d988
parent42b62872275ff757b999cf189fe48693c576a282 (diff)
downloadframeworks_av-16c6f1a2863cd51398f92a22c6980690e98329d8.tar.gz
frameworks_av-16c6f1a2863cd51398f92a22c6980690e98329d8.tar.bz2
frameworks_av-16c6f1a2863cd51398f92a22c6980690e98329d8.zip
MPEG4Source: fix fragmented read.
Test: passed CTS test DecoderTest#testDecodeFragmented Bug: 64314728 Bug: 36571704 Change-Id: I71ad6aaae473b03483f8405899d3178148597bba (cherry picked from commit ba9af7792dfed6e9b1b216aab91a97e713eec891) (cherry picked from commit 6b401a337674f2f22b7589534700a33187899869) CVE-2017-0774
-rwxr-xr-xmedia/libstagefright/MPEG4Extractor.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/media/libstagefright/MPEG4Extractor.cpp b/media/libstagefright/MPEG4Extractor.cpp
index 8c66c29d91..af7781b9d0 100755
--- a/media/libstagefright/MPEG4Extractor.cpp
+++ b/media/libstagefright/MPEG4Extractor.cpp
@@ -3547,7 +3547,8 @@ status_t MPEG4Source::parseChunk(off64_t *offset) {
while (true) {
if (mDataSource->readAt(*offset, hdr, 8) < 8) {
- return ERROR_END_OF_STREAM;
+ // no more box to the end of file.
+ break;
}
chunk_size = ntohl(hdr[0]);
chunk_type = ntohl(hdr[1]);