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

Commit f3ff858f authored by Chad Brubaker's avatar Chad Brubaker
Browse files

Enable fsanitize unsigned-integer-overflow in MPEG2

Bug: 23110888
Change-Id: I224596af776d362bc8d0d72138695c3f7f21759b
(cherry picked from commit 6325a738)
parent 7c7094ec
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -14,6 +14,8 @@ LOCAL_C_INCLUDES:= \
	$(TOP)/frameworks/native/include/media/openmax

LOCAL_CFLAGS += -Werror
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);
        }