diff --git a/glibc-2.14-32args-printf.patch b/glibc-2.14-32args-printf.patch new file mode 100644 index 0000000..cbd27cc --- /dev/null +++ b/glibc-2.14-32args-printf.patch @@ -0,0 +1,24 @@ +# patch to fix printf when register_printf_function is in use and the format to +# printf contains more than 64 elements. +# +# extend_alloca modifies nspecs_max (2nd arg) with the size of the space, not the +# number of elements. Use a temporary to store the return value. Explicitly set the correct size. +# +# bnc#733140 +# +# Rich Coe (rcoe@wi.rr.com) +# +--- stdio-common/vfprintf.c.orig 2011-11-28 11:53:32.937976831 -0600 ++++ stdio-common/vfprintf.c 2011-11-28 16:07:35.546839533 -0600 +@@ -1683,8 +1683,10 @@ do_positional: + { + /* Extend the array of format specifiers. */ + struct printf_spec *old = specs; +- specs = extend_alloca (specs, nspecs_max, ++ size_t nsize = nspecs_max; ++ specs = extend_alloca (specs, nsize, + 2 * nspecs_max * sizeof (*specs)); ++ nspecs_max = 2 * nspecs_max; + + /* Copy the old array's elements to the new space. */ + memmove (specs, old, nspecs * sizeof (struct printf_spec)); diff --git a/glibc.changes b/glibc.changes index 49378cb..a7c8878 100644 --- a/glibc.changes +++ b/glibc.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Nov 29 03:09:56 UTC 2011 - rcoe@wi.rr.com + +- fix printf with many args and printf arg specifiers (bnc#733140) + ------------------------------------------------------------------- Thu Nov 24 14:02:55 UTC 2011 - aj@suse.de diff --git a/glibc.spec b/glibc.spec index 82121fe..d3b0b14 100644 --- a/glibc.spec +++ b/glibc.spec @@ -223,6 +223,8 @@ Patch82: crypt_blowfish-1.2-hack_around_arm.diff Patch83: glibc-arm-clone-unwind-fix.diff # PATCH-FIX-OPENSUSE avoid false positive warning that triggers brp postcheck fail Patch84: nscd-avoid-gcc-warning.diff +# PATCH-FIX-OPENSUSE fix printf with > 32 args and printf specifiers bnc#733140, bso#13446 +Patch85: glibc-2.14-32args-printf.patch %description The GNU C Library provides the most important standard libraries used @@ -463,6 +465,7 @@ rm nscd/s-stamp %patch74 -p1 %patch75 -p1 %patch84 +%patch85 # # Inconsistency detected by ld.so: dl-close.c: 719: _dl_close: Assertion `map->l_init_called' failed!