commit | a46c480e43cc61d0190569684f0a1e53a5da75b6 | [log] [tgz] |
---|---|---|
author | Nick Kralevich <nnk@google.com> | Mon Jun 04 15:30:24 2012 -0700 |
committer | Nick Kralevich <nnk@google.com> | Thu Jun 07 08:55:06 2012 -0700 |
tree | 6c3376af379e95074d5707080f6d1160632f6c39 | |
parent | d5ba4064c3cccdd453cd10bbef2d25ec5c286a62 [diff] |
arm: add -D_FORTIFY_SOURCE=1 to the default cflags Add additional compile and runtime buffer overflow detection to Android. As of today, Android supports additional buffer overflow detection for the following libc functions: * memcpy * memmove * strcpy * strcat * strncpy * strncat Support for additional functions will be added to bionic libc in future code changes. Please see * http://gcc.gnu.org/onlinedocs/gcc/Object-Size-Checking.html * http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html for information on these features. Change-Id: I1a281a4bac20009f4730dd8d8b798fa107576230
diff --git a/core/combo/TARGET_linux-arm.mk b/core/combo/TARGET_linux-arm.mk index 98868ae..bca442d 100644 --- a/core/combo/TARGET_linux-arm.mk +++ b/core/combo/TARGET_linux-arm.mk
@@ -109,6 +109,7 @@ -fstack-protector \ -Wa,--noexecstack \ -Werror=format-security \ + -D_FORTIFY_SOURCE=1 \ -fno-short-enums \ $(arch_variant_cflags) \ -include $(android_config_h) \