aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeremy Condra <gcondra@google.com>2012-06-05 15:17:48 -0700
committerGeremy Condra <gcondra@google.com>2012-06-05 16:04:29 -0700
commit1baa2e21111fb8cdc3d8c1fe5179975709913213 (patch)
tree449baf2adad2786c0d29b30d39b768f26283a5ff
parentd0a25c6df9fca7221ce72027701df4e1eb59cb16 (diff)
downloadexternal_libpng-1baa2e21111fb8cdc3d8c1fe5179975709913213.zip
external_libpng-1baa2e21111fb8cdc3d8c1fe5179975709913213.tar.gz
external_libpng-1baa2e21111fb8cdc3d8c1fe5179975709913213.tar.bz2
Add signed integer overflow checking to libpng.
This change moves libpng over to Clang in order to take advantage of its stronger -ftrapv option, causing the code to abort rather than allowing a signed integer overflow. Change-Id: Ia9573f41f3d14ac3123be1e2c7b17cc8338c69b8
-rw-r--r--Android.mk6
1 files changed, 2 insertions, 4 deletions
diff --git a/Android.mk b/Android.mk
index 4e92908..c89472e 100644
--- a/Android.mk
+++ b/Android.mk
@@ -59,9 +59,9 @@ include $(BUILD_HOST_STATIC_LIBRARY)
# =====================================================
include $(CLEAR_VARS)
-
+LOCAL_CLANG := true
LOCAL_SRC_FILES := $(common_SRC_FILES)
-LOCAL_CFLAGS += $(common_CFLAGS)
+LOCAL_CFLAGS += $(common_CFLAGS) -ftrapv
LOCAL_C_INCLUDES += $(common_C_INCLUDES) \
external/zlib
LOCAL_SHARED_LIBRARIES := \
@@ -73,5 +73,3 @@ LOCAL_COPY_HEADERS_TO := $(common_COPY_HEADERS_TO)
LOCAL_COPY_HEADERS := $(common_COPY_HEADERS)
include $(BUILD_STATIC_LIBRARY)
-
-