libutils: Enable LOCAL_SANITIZE := integer

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

Change-Id: I475e5e9fb04160dd2d201e926ab2b897539f8bb6
This commit is contained in:
Nick Kralevich 2015-08-24 10:51:38 -07:00
parent e3c028836f
commit 4d587f2f9a

View file

@ -92,6 +92,8 @@ LOCAL_SHARED_LIBRARIES := \
libdl
LOCAL_MODULE := libutils
LOCAL_CLANG := true
LOCAL_SANITIZE := integer
include $(BUILD_STATIC_LIBRARY)
# For the device, shared
@ -106,6 +108,8 @@ LOCAL_SHARED_LIBRARIES := \
liblog
LOCAL_CFLAGS := -Werror
LOCAL_CLANG := true
LOCAL_SANITIZE := integer
include $(BUILD_SHARED_LIBRARY)