rcolebaugh / rpms / bash

Forked from rpms/bash 2 years ago
Clone
287226
			     BASH PATCH REPORT
287226
			     =================
287226
287226
Bash-Release:	4.2
287226
Patch-ID:	bash42-024
287226
287226
Bug-Reported-by:	Jim Avera <james_avera@yahoo.com>
287226
Bug-Reference-ID:	<4F29E07A.80405@yahoo.com>
287226
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2012-02/msg00001.html
287226
287226
Bug-Description:
287226
287226
When `printf -v' is used to set an array element, the format string contains
287226
`%b', and the corresponding argument is the empty string, the buffer used
287226
to store the value to be assigned can be NULL, which results in NUL being
287226
assigned to the array element.  This causes a seg fault when it's used later.
287226
287226
Patch (apply with `patch -p0'):
287226
287226
*** ../bash-4.2-patched/builtins/printf.def	2011-02-25 12:07:41.000000000 -0500
287226
--- builtins/printf.def	2012-02-02 08:37:12.000000000 -0500
287226
***************
287226
*** 256,259 ****
287226
--- 257,262 ----
287226
  	    {
287226
  	      vflag = 1;
287226
+ 	      if (vbsize == 0)
287226
+ 		vbuf = xmalloc (vbsize = 16);
287226
  	      vblen = 0;
287226
  	      if (vbuf)
287226
*** ../bash-4.2-patched/patchlevel.h	Sat Jun 12 20:14:48 2010
287226
--- patchlevel.h	Thu Feb 24 21:41:34 2011
287226
***************
287226
*** 26,30 ****
287226
     looks for to find the patch level (for the sccs version string). */
287226
  
287226
! #define PATCHLEVEL 23
287226
  
287226
  #endif /* _PATCHLEVEL_H_ */
287226
--- 26,30 ----
287226
     looks for to find the patch level (for the sccs version string). */
287226
  
287226
! #define PATCHLEVEL 24
287226
  
287226
  #endif /* _PATCHLEVEL_H_ */