Date: Sunday, November 1, 2009 @ 07:06:32 Author: allan Revision: 57666
upgpkg: glibc 2.11-1 upstream update Deleted: glibc/trunk/binutils-2.20.patch glibc/trunk/formatting-integer-overflow.patch -----------------------------------+ binutils-2.20.patch | 52 ------------- formatting-integer-overflow.patch | 144 ------------------------------------ 2 files changed, 196 deletions(-) Deleted: binutils-2.20.patch =================================================================== --- binutils-2.20.patch 2009-11-01 11:51:34 UTC (rev 57665) +++ binutils-2.20.patch 2009-11-01 12:06:32 UTC (rev 57666) @@ -1,52 +0,0 @@ -From 4c14c8c348ee3e9a5fea3608cabcabdb275b6141 Mon Sep 17 00:00:00 2001 -From: H.J. Lu <hongjiu...@intel.com> -Date: Sat, 5 Sep 2009 07:06:19 -0700 -Subject: [PATCH] Support binutils 2.20. - ---- - configure | 4 ++-- - configure.in | 4 ++-- - 3 files changed, 8 insertions(+), 4 deletions(-) - -diff --git a/configure b/configure -index 48e6952..b1d84d7 100755 ---- a/configure -+++ b/configure -@@ -4841,7 +4841,7 @@ $as_echo_n "checking version of $AS... " >&6; } - ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 2.1[3-9]*) -+ 2.1[3-9]*|[2-9].[2-9]*) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - -@@ -4904,7 +4904,7 @@ $as_echo_n "checking version of $LD... " >&6; } - ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*GNU ld.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 2.1[3-9]*) -+ 2.1[3-9]*|[2-9].[2-9]*) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - -diff --git a/configure.in b/configure.in -index 4584afe..7c4f71f 100644 ---- a/configure.in -+++ b/configure.in -@@ -897,10 +897,10 @@ AC_SUBST(MIG)dnl Needed by sysdeps/mach/configure.in - # Accept binutils 2.13 or newer. - AC_CHECK_PROG_VER(AS, $AS, --version, - [GNU assembler.* \([0-9]*\.[0-9.]*\)], -- [2.1[3-9]*], AS=: critic_missing="$critic_missing as") -+ [2.1[3-9]*|[2-9].[2-9]*], AS=: critic_missing="$critic_missing as") - AC_CHECK_PROG_VER(LD, $LD, --version, - [GNU ld.* \([0-9][0-9]*\.[0-9.]*\)], -- [2.1[3-9]*], LD=: critic_missing="$critic_missing ld") -+ [2.1[3-9]*|[2-9].[2-9]*], LD=: critic_missing="$critic_missing ld") - - # We need the physical current working directory. We cannot use the - # "pwd -P" shell builtin since that's not portable. Instead we try to --- -1.6.4 - Deleted: formatting-integer-overflow.patch =================================================================== --- formatting-integer-overflow.patch 2009-11-01 11:51:34 UTC (rev 57665) +++ formatting-integer-overflow.patch 2009-11-01 12:06:32 UTC (rev 57666) @@ -1,144 +0,0 @@ -From 199eb0de8d673fb23aa127721054b4f1803d61f3 Mon Sep 17 00:00:00 2001 -From: Andreas Schwab <sch...@redhat.com> -Date: Tue, 29 Sep 2009 06:11:59 -0700 -Subject: [PATCH] Check for integer overflows in formatting functions - ---- - stdio-common/printf_fp.c | 11 ++++++++- - stdio-common/vfprintf.c | 49 +++++++++++++++++++++++++++++---------------- - 3 files changed, 45 insertions(+), 20 deletions(-) - -diff --git a/stdio-common/printf_fp.c b/stdio-common/printf_fp.c -index cd3ada6..b60ddec 100644 ---- a/stdio-common/printf_fp.c -+++ b/stdio-common/printf_fp.c -@@ -891,8 +891,15 @@ ___printf_fp (FILE *fp, - it is possible that we need two more characters in front of all the - other output. If the amount of memory we have to allocate is too - large use `malloc' instead of `alloca'. */ -- size_t wbuffer_to_alloc = (2 + (size_t) chars_needed) * sizeof (wchar_t); -- buffer_malloced = ! __libc_use_alloca (chars_needed * 2 * sizeof (wchar_t)); -+ if (__builtin_expect (chars_needed >= (size_t) -1 / sizeof (wchar_t) - 2 -+ || chars_needed < fracdig_max, 0)) -+ { -+ /* Some overflow occurred. */ -+ __set_errno (ERANGE); -+ return -1; -+ } -+ size_t wbuffer_to_alloc = (2 + chars_needed) * sizeof (wchar_t); -+ buffer_malloced = ! __libc_use_alloca (wbuffer_to_alloc); - if (__builtin_expect (buffer_malloced, 0)) - { - wbuffer = (wchar_t *) malloc (wbuffer_to_alloc); -diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c -index 38ba8ff..6e0e85c 100644 ---- a/stdio-common/vfprintf.c -+++ b/stdio-common/vfprintf.c -@@ -1439,23 +1439,29 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap) - left = 1; - } - -- if (width + 32 >= (int) (sizeof (work_buffer) -- / sizeof (work_buffer[0]))) -+ if (__builtin_expect (width >= (size_t) -1 / sizeof (CHAR_T) - 32, 0)) -+ { -+ __set_errno (ERANGE); -+ done = -1; -+ goto all_done; -+ } -+ -+ if (width >= sizeof (work_buffer) / sizeof (work_buffer[0]) - 32) - { - /* We have to use a special buffer. The "32" is just a safe - bet for all the output which is not counted in the width. */ -- if (__libc_use_alloca ((width + 32) * sizeof (CHAR_T))) -- workend = ((CHAR_T *) alloca ((width + 32) * sizeof (CHAR_T)) -- + (width + 32)); -+ size_t needed = ((size_t) width + 32) * sizeof (CHAR_T); -+ if (__libc_use_alloca (needed)) -+ workend = (CHAR_T *) alloca (needed) + width + 32; - else - { -- workstart = (CHAR_T *) malloc ((width + 32) * sizeof (CHAR_T)); -+ workstart = (CHAR_T *) malloc (needed); - if (workstart == NULL) - { - done = -1; - goto all_done; - } -- workend = workstart + (width + 32); -+ workend = workstart + width + 32; - } - } - } -@@ -1465,22 +1471,29 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap) - LABEL (width): - width = read_int (&f); - -- if (width + 32 >= (int) (sizeof (work_buffer) / sizeof (work_buffer[0]))) -+ if (__builtin_expect (width >= (size_t) -1 / sizeof (CHAR_T) - 32, 0)) -+ { -+ __set_errno (ERANGE); -+ done = -1; -+ goto all_done; -+ } -+ -+ if (width >= sizeof (work_buffer) / sizeof (work_buffer[0]) - 32) - { - /* We have to use a special buffer. The "32" is just a safe - bet for all the output which is not counted in the width. */ -- if (__libc_use_alloca ((width + 32) * sizeof (CHAR_T))) -- workend = ((CHAR_T *) alloca ((width + 32) * sizeof (CHAR_T)) -- + (width + 32)); -+ size_t needed = ((size_t) width + 32) * sizeof (CHAR_T); -+ if (__libc_use_alloca (needed)) -+ workend = (CHAR_T *) alloca (needed) + width + 32; - else - { -- workstart = (CHAR_T *) malloc ((width + 32) * sizeof (CHAR_T)); -+ workstart = (CHAR_T *) malloc (needed); - if (workstart == NULL) - { - done = -1; - goto all_done; - } -- workend = workstart + (width + 32); -+ workend = workstart + width + 32; - } - } - if (*f == L_('$')) -@@ -1510,18 +1523,18 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap) - else - prec = 0; - if (prec > width -- && prec + 32 > (int)(sizeof (work_buffer) / sizeof (work_buffer[0]))) -+ && prec > sizeof (work_buffer) / sizeof (work_buffer[0]) - 32) - { -- if (__builtin_expect (prec > ~((size_t) 0) / sizeof (CHAR_T) - 31, -- 0)) -+ if (__builtin_expect (prec >= (size_t) -1 / sizeof (CHAR_T) - 32, 0)) - { -+ __set_errno (ERANGE); - done = -1; - goto all_done; - } - size_t needed = ((size_t) prec + 32) * sizeof (CHAR_T); - - if (__libc_use_alloca (needed)) -- workend = (((CHAR_T *) alloca (needed)) + ((size_t) prec + 32)); -+ workend = (CHAR_T *) alloca (needed) + prec + 32; - else - { - workstart = (CHAR_T *) malloc (needed); -@@ -1530,7 +1543,7 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap) - done = -1; - goto all_done; - } -- workend = workstart + ((size_t) prec + 32); -+ workend = workstart + prec + 32; - } - } - JUMP (*f, step2_jumps); --- -1.6.4 -