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

Commit 6325a738 authored by Chad Brubaker's avatar Chad Brubaker
Browse files

Enable fsanitize unsigned-integer-overflow in MPEG2

Bug: 23110888
Change-Id: I224596af776d362bc8d0d72138695c3f7f21759b
parent 40b8053c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@ LOCAL_C_INCLUDES:= \

LOCAL_CFLAGS += -Werror -Wall
LOCAL_CLANG := true
LOCAL_SANITIZE := unsigned-integer-overflow

LOCAL_MODULE:= libstagefright_mpeg2ts

+2 −1
Original line number Diff line number Diff line
@@ -108,7 +108,8 @@ MPEG2PSExtractor::MPEG2PSExtractor(const sp<DataSource> &source)
    }

    // Remove all tracks that were unable to determine their format.
    for (size_t i = mTracks.size(); i-- > 0;) {
    for (size_t i = mTracks.size(); i > 0;) {
        i--;
        if (mTracks.valueAt(i)->getFormat() == NULL) {
            mTracks.removeItemsAt(i);
        }