libutils: Enable LOCAL_SANITIZE := integer
Call abort() on undefined or sketchy integer behavior.
Protects against integer overflow attacks.
Change-Id: I475e5e9fb04160dd2d201e926ab2b897539f8bb6
diff --git a/libutils/Android.mk b/libutils/Android.mk
index 8f829f3..8226db2 100644
--- a/libutils/Android.mk
+++ b/libutils/Android.mk
@@ -92,6 +92,8 @@
libdl
LOCAL_MODULE := libutils
+LOCAL_CLANG := true
+LOCAL_SANITIZE := integer
include $(BUILD_STATIC_LIBRARY)
# For the device, shared
@@ -106,6 +108,8 @@
liblog
LOCAL_CFLAGS := -Werror
+LOCAL_CLANG := true
+LOCAL_SANITIZE := integer
include $(BUILD_SHARED_LIBRARY)