Tomas Janousek 5ec834
			     BASH PATCH REPORT
Tomas Janousek 5ec834
			     =================
Tomas Janousek 5ec834
Tomas Janousek 5ec834
Bash-Release: 3.2
Tomas Janousek 5ec834
Patch-ID: bash32-033
Tomas Janousek 5ec834
Tomas Janousek 5ec834
Bug-Reported-by:	Christophe Martin <schplurtz@free.fr>
Tomas Janousek 5ec834
Bug-Reference-ID:	<465ABA4A.3030805@free.fr>
Tomas Janousek 5ec834
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2007-05/msg00104.html
Tomas Janousek 5ec834
Tomas Janousek 5ec834
Bug-Description:
Tomas Janousek 5ec834
Tomas Janousek 5ec834
References made within a function to an uninitialized local array variable
Tomas Janousek 5ec834
using the [*] subscript in a double-quoted string  can result in spurious
Tomas Janousek 5ec834
ASCII 127 characters in the expanded value.
Tomas Janousek 5ec834
Tomas Janousek 5ec834
Patch:
Tomas Janousek 5ec834
Tomas Janousek 5ec834
*** ../bash-3.2-patched/arrayfunc.c	2007-08-25 13:47:05.000000000 -0400
Tomas Janousek 5ec834
--- arrayfunc.c	2007-05-31 11:55:46.000000000 -0400
Tomas Janousek 5ec834
***************
Tomas Janousek 5ec834
*** 723,727 ****
Tomas Janousek 5ec834
      {
Tomas Janousek 5ec834
        if (rtype)
Tomas Janousek 5ec834
! 	*rtype = 1;
Tomas Janousek 5ec834
        if (allow_all == 0)
Tomas Janousek 5ec834
  	{
Tomas Janousek 5ec834
--- 723,727 ----
Tomas Janousek 5ec834
      {
Tomas Janousek 5ec834
        if (rtype)
Tomas Janousek 5ec834
! 	*rtype = (t[0] == '*') ? 1 : 2;
Tomas Janousek 5ec834
        if (allow_all == 0)
Tomas Janousek 5ec834
  	{
Tomas Janousek 5ec834
*** ../bash-3.2-patched/subst.c	2007-08-25 13:47:08.000000000 -0400
Tomas Janousek 5ec834
--- subst.c	2007-11-14 15:43:00.000000000 -0500
Tomas Janousek 5ec834
***************
Tomas Janousek 5ec834
*** 4908,4915 ****
Tomas Janousek 5ec834
    intmax_t arg_index;
Tomas Janousek 5ec834
    SHELL_VAR *var;
Tomas Janousek 5ec834
!   int atype;
Tomas Janousek 5ec834
  
Tomas Janousek 5ec834
    ret = 0;
Tomas Janousek 5ec834
    temp = 0;
Tomas Janousek 5ec834
  
Tomas Janousek 5ec834
    /* Handle multiple digit arguments, as in ${11}. */  
Tomas Janousek 5ec834
--- 4973,4981 ----
Tomas Janousek 5ec834
    intmax_t arg_index;
Tomas Janousek 5ec834
    SHELL_VAR *var;
Tomas Janousek 5ec834
!   int atype, rflags;
Tomas Janousek 5ec834
  
Tomas Janousek 5ec834
    ret = 0;
Tomas Janousek 5ec834
    temp = 0;
Tomas Janousek 5ec834
+   rflags = 0;
Tomas Janousek 5ec834
  
Tomas Janousek 5ec834
    /* Handle multiple digit arguments, as in ${11}. */  
Tomas Janousek 5ec834
***************
Tomas Janousek 5ec834
*** 4944,4947 ****
Tomas Janousek 5ec834
--- 5010,5015 ----
Tomas Janousek 5ec834
   		  ? quote_string (temp)
Tomas Janousek 5ec834
   		  : quote_escapes (temp);
Tomas Janousek 5ec834
+       else if (atype == 1 && temp && QUOTED_NULL (temp) && (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)))
Tomas Janousek 5ec834
+ 	rflags |= W_HASQUOTEDNULL;
Tomas Janousek 5ec834
      }
Tomas Janousek 5ec834
  #endif
Tomas Janousek 5ec834
***************
Tomas Janousek 5ec834
*** 4971,4974 ****
Tomas Janousek 5ec834
--- 5039,5043 ----
Tomas Janousek 5ec834
        ret = alloc_word_desc ();
Tomas Janousek 5ec834
        ret->word = temp;
Tomas Janousek 5ec834
+       ret->flags |= rflags;
Tomas Janousek 5ec834
      }
Tomas Janousek 5ec834
    return ret;
Tomas Janousek 5ec834
*** ../bash-3.2/patchlevel.h	Thu Apr 13 08:31:04 2006
Tomas Janousek 5ec834
--- patchlevel.h	Mon Oct 16 14:22:54 2006
Tomas Janousek 5ec834
***************
Tomas Janousek 5ec834
*** 26,30 ****
Tomas Janousek 5ec834
     looks for to find the patch level (for the sccs version string). */
Tomas Janousek 5ec834
  
Tomas Janousek 5ec834
! #define PATCHLEVEL 32
Tomas Janousek 5ec834
  
Tomas Janousek 5ec834
  #endif /* _PATCHLEVEL_H_ */
Tomas Janousek 5ec834
--- 26,30 ----
Tomas Janousek 5ec834
     looks for to find the patch level (for the sccs version string). */
Tomas Janousek 5ec834
  
Tomas Janousek 5ec834
! #define PATCHLEVEL 33
Tomas Janousek 5ec834
  
Tomas Janousek 5ec834
  #endif /* _PATCHLEVEL_H_ */
Tomas Janousek 5ec834