diff options
author | Dan Austin <danielaustin@google.com> | 2015-10-16 10:10:57 -0700 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-11-05 21:16:18 -0800 |
commit | 9c937ad0d4f963eb904fb7c715f03f9a69995a4c (patch) | |
tree | 69e9a592438baec43b02747186222c403ef56632 /media/libstagefright/httplive | |
parent | fefd7d1974ad75ae99c2b4bbbbdee6146d133ab6 (diff) | |
download | frameworks_av-9c937ad0d4f963eb904fb7c715f03f9a69995a4c.zip frameworks_av-9c937ad0d4f963eb904fb7c715f03f9a69995a4c.tar.gz frameworks_av-9c937ad0d4f963eb904fb7c715f03f9a69995a4c.tar.bz2 |
Benign integer overflow in PlaylistFetcher
There is a benign integer overflow in the loop that finds the
smallest first PTS from all streams in the current parser. The
loop has been refactored to eliminate the integer overflow.
Bug: 25008541
Change-Id: Ie2c0f1d360023cad960e071d810dddb1b5420470
Diffstat (limited to 'media/libstagefright/httplive')
-rw-r--r-- | media/libstagefright/httplive/PlaylistFetcher.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/media/libstagefright/httplive/PlaylistFetcher.cpp b/media/libstagefright/httplive/PlaylistFetcher.cpp index 023de93..23a4275 100644 --- a/media/libstagefright/httplive/PlaylistFetcher.cpp +++ b/media/libstagefright/httplive/PlaylistFetcher.cpp @@ -1634,7 +1634,8 @@ status_t PlaylistFetcher::extractAndQueueAccessUnitsFromTs(const sp<ABuffer> &bu if (mSegmentFirstPTS < 0ll) { // get the smallest first PTS from all streams present in this parser - for (size_t i = mPacketSources.size(); i-- > 0;) { + for (size_t i = mPacketSources.size(); i > 0;) { + i--; const LiveSession::StreamType stream = mPacketSources.keyAt(i); if (stream == LiveSession::STREAMTYPE_SUBTITLES) { ALOGE("MPEG2 Transport streams do not contain subtitles."); |