qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 14/15] Add -fstack-protector-all to CFLAGS


From: Kirill A. Shutemov
Subject: [Qemu-devel] [PATCH 14/15] Add -fstack-protector-all to CFLAGS
Date: Sat, 2 Jan 2010 05:45:32 +0200

-fstack-protector-all emit extra code to check for buffer overflows,
such as stack smashing attacks.  This is done by adding a guard
variable to functions with vulnerable objects.

Signed-off-by: Kirill A. Shutemov <address@hidden>
---
 configure |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/configure b/configure
index 0cdcdb3..ec4175a 100755
--- a/configure
+++ b/configure
@@ -123,6 +123,14 @@ else
     exit 1
 fi
 
+# check -fstack-protector-all
+cat > $TMPC << EOF
+int foo(void) {char X[2]; return 3;}
+EOF
+if compile_object "$QEMU_CFLAGS" -fstack-protector-all; then
+    QEMU_CFLAGS="-fstack-protector-all $QEMU_CFLAGS"
+fi
+
 check_define() {
 cat > $TMPC <<EOF
 #if !defined($1)
-- 
1.6.5.7





reply via email to

[Prev in Thread] Current Thread [Next in Thread]