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
This commit is contained in:
parent
532e6cde99
commit
fc82dd9179
1 changed files with 4 additions and 0 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue