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

Commit 81f8b15d authored by Eric Laurent's avatar Eric Laurent Committed by Marco Nelissen
Browse files

Revert "Disable integer sanitization for amrwbenc"

Fix some more overflows, and turn sanitize back on.

Bug: 26416048
Change-Id: I17d3b8a975770c6b5778610c1ff7928fce598e21
parent 47dabd38
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -102,7 +102,7 @@ LOCAL_C_INCLUDES := \


LOCAL_CFLAGS += -Werror
LOCAL_CFLAGS += -Werror
LOCAL_CLANG := true
LOCAL_CLANG := true
#LOCAL_SANITIZE := signed-integer-overflow
LOCAL_SANITIZE := signed-integer-overflow


include $(BUILD_STATIC_LIBRARY)
include $(BUILD_STATIC_LIBRARY)


@@ -120,7 +120,7 @@ LOCAL_C_INCLUDES := \


LOCAL_CFLAGS += -Werror
LOCAL_CFLAGS += -Werror
LOCAL_CLANG := true
LOCAL_CLANG := true
#LOCAL_SANITIZE := signed-integer-overflow
LOCAL_SANITIZE := signed-integer-overflow


LOCAL_STATIC_LIBRARIES := \
LOCAL_STATIC_LIBRARIES := \
        libstagefright_amrwbenc
        libstagefright_amrwbenc
+2 −2
Original line number Original line Diff line number Diff line
@@ -1014,8 +1014,8 @@ void search_ixiy(
            {
            {
                ps2 = add1(ps1, dn[y]);
                ps2 = add1(ps1, dn[y]);


                alp2 = alp1 + ((*p1++)<<13);
                alp2 = L_add(alp1, ((*p1++)<<13));
                alp2 = alp2 + ((*p2++)<<14);
                alp2 = L_add(alp2, ((*p2++)<<14));
                alp_16 = extract_h(alp2);
                alp_16 = extract_h(alp2);
                sq = vo_mult(ps2, ps2);
                sq = vo_mult(ps2, ps2);
                s = vo_L_mult(alpk, sq) - ((sqk * alp_16)<<1);
                s = vo_L_mult(alpk, sq) - ((sqk * alp_16)<<1);