# HG changeset patch # User Bruno Haible # Date 1189942952 0 # Node ID 39a1b395c33329ff2845f977b79007ff396bedd1 # Parent 6c916785c03e775af3a7b9bd89bf844122e5becb Make the buffer large enough, to avoid a buffer overflow. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-09-16 Bruno Haible + + * m4/printf.m4 (gl_PRINTF_LONG_DOUBLE, gl_PRINTF_INFINITE, + gl_PRINTF_INFINITE_LONG_DOUBLE): Increase buf's size from 100 to 10000. + Needed on glibc-2.6.1 with -fstack-protector -D_FORTIFY_SOURCE=2. + Reported by Greg Schafer . + 2007-09-15 Bruno Haible * gnulib-tool (sed): Try a little harder to make bash understand the diff --git a/m4/printf.m4 b/m4/printf.m4 --- a/m4/printf.m4 +++ b/m4/printf.m4 @@ -1,4 +1,4 @@ -# printf.m4 serial 15 +# printf.m4 serial 16 dnl Copyright (C) 2003, 2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -95,7 +95,7 @@ AC_TRY_RUN([ #include #include -static char buf[100]; +static char buf[10000]; int main () { buf[0] = '\0'; @@ -156,7 +156,7 @@ } return 0; } -static char buf[100]; +static char buf[10000]; static double zero = 0.0; int main () { @@ -261,7 +261,7 @@ } return 0; } -static char buf[100]; +static char buf[10000]; static long double zeroL = 0.0L; int main () {