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

Commit fc82dd91 authored by Nick Kralevich's avatar Nick Kralevich
Browse files

libcutils: enable LOCAL_SANITIZE := integer

Call abort() on undefined or sketchy integer behavior.
Protects against integer overflow attacks.

Tested on Nexus 5 and Nexus 9 with no obvious problems.

Change-Id: I6cb28b4a0f5feed69ea472dfac8804fb0bf99719
parent 532e6cde
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -123,6 +123,8 @@ LOCAL_SRC_FILES_x86_64 += \
LOCAL_C_INCLUDES := $(libcutils_c_includes)
LOCAL_STATIC_LIBRARIES := liblog
LOCAL_CFLAGS += -Werror -Wall -Wextra -std=gnu90
LOCAL_CLANG := true
LOCAL_SANITIZE := integer
include $(BUILD_STATIC_LIBRARY)

include $(CLEAR_VARS)
@@ -133,6 +135,8 @@ LOCAL_WHOLE_STATIC_LIBRARIES := libcutils liblog
LOCAL_SHARED_LIBRARIES := liblog
LOCAL_CFLAGS += -Werror -Wall -Wextra
LOCAL_C_INCLUDES := $(libcutils_c_includes)
LOCAL_CLANG := true
LOCAL_SANITIZE := integer
include $(BUILD_SHARED_LIBRARY)

include $(call all-makefiles-under,$(LOCAL_PATH))