From: Bruno Haible Date: Sun, 16 Sep 2007 11:42:32 +0000 (+0000) Subject: Make the buffer large enough, to avoid a buffer overflow. X-Git-Tag: cvs-readonly~4 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=99e382038a886fc0e7f38a76f465f5662cb34f62;p=gnulib.git Make the buffer large enough, to avoid a buffer overflow. --- diff --git a/ChangeLog b/ChangeLog index d26212c66..1bbbd27fa 100644 --- 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 index 70ac3a38d..06ce939ab 100644 --- 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_DEFUN([gl_PRINTF_LONG_DOUBLE], AC_TRY_RUN([ #include #include -static char buf[100]; +static char buf[10000]; int main () { buf[0] = '\0'; @@ -156,7 +156,7 @@ strisnan (const char *string, size_t start_index, size_t end_index) } return 0; } -static char buf[100]; +static char buf[10000]; static double zero = 0.0; int main () { @@ -261,7 +261,7 @@ strisnan (const char *string, size_t start_index, size_t end_index) } return 0; } -static char buf[100]; +static char buf[10000]; static long double zeroL = 0.0L; int main () {