Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 33b2f14a authored by Dan Austin's avatar Dan Austin
Browse files

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
parent 5e925e02
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1628,7 +1628,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.");