From 53e2660a948d538876acc1ecbf19746ed2a0468e Mon Sep 17 00:00:00 2001 From: djm Date: Sun, 7 Dec 2008 22:35:36 +0000 Subject: [PATCH] - (djm) [configure.ac] bz#1538: better test for ProPolice/SSP: actually use some stack in main(). Report and suggested fix from vapier AT gentoo.org --- ChangeLog | 5 +++++ configure.ac | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6e53fd47..4a74d4d0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +20081208 + - (djm) [configure.ac] bz#1538: better test for ProPolice/SSP: actually + use some stack in main(). + Report and suggested fix from vapier AT gentoo.org + 20081201 - (dtucker) [contrib/cygwin/{Makefile,ssh-host-config}] Add new doc files and tweak the is-sshd-running check in ssh-host-config. Patch from diff --git a/configure.ac b/configure.ac index 4c1dfad6..febeb147 100644 --- a/configure.ac +++ b/configure.ac @@ -126,7 +126,7 @@ int main(void){char b[10]; memset(b, 0, sizeof(b));} # -fstack-protector-all doesn't always work for some GCC versions # and/or platforms, so we test if we can. If it's not supported - # on a give platform gcc will emit a warning so we use -Werror. + # on a given platform gcc will emit a warning so we use -Werror. if test "x$use_stack_protector" = "x1"; then for t in -fstack-protector-all -fstack-protector; do AC_MSG_CHECKING(if $CC supports $t) @@ -136,8 +136,8 @@ int main(void){char b[10]; memset(b, 0, sizeof(b));} LDFLAGS="$LDFLAGS $t -Werror" AC_LINK_IFELSE( [AC_LANG_SOURCE([ -#include -int main(void){return 0;} +#include +int main(void){char x[[256]]; snprintf(x, sizeof(x), "XXX"); return 0;} ])], [ AC_MSG_RESULT(yes) CFLAGS="$saved_CFLAGS $t" @@ -145,8 +145,8 @@ int main(void){return 0;} AC_MSG_CHECKING(if $t works) AC_RUN_IFELSE( [AC_LANG_SOURCE([ -#include -int main(void){exit(0);} +#include +int main(void){char x[[256]]; snprintf(x, sizeof(x), "XXX"); return 0;} ])], [ AC_MSG_RESULT(yes) break ], -- 2.45.1