Roman Rakus 2455014
			     BASH PATCH REPORT
Roman Rakus 2455014
			     =================
Roman Rakus 2455014
Roman Rakus 2455014
Bash-Release: 4.0
Roman Rakus 2455014
Patch-ID: bash40-005
Roman Rakus 2455014
Roman Rakus 2455014
Bug-Reported-by:	Pierre Gaston <pierre.gaston@gmail.com>
Roman Rakus 2455014
Bug-Reference-ID:	<c440c9800902242338n69f594a4nd66b8748def9cf18@mail.gmail.com>
Roman Rakus 2455014
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2009-02/msg00206.html
Roman Rakus 2455014
Roman Rakus 2455014
Bug-Description:
Roman Rakus 2455014
Roman Rakus 2455014
The `declare' builtin dumped core when attempting to assign associative
Roman Rakus 2455014
array indices containing some special characters, even when they were
Roman Rakus 2455014
quoted before being expanded.
Roman Rakus 2455014
Roman Rakus 2455014
Patch:
Roman Rakus 2455014
Roman Rakus 2455014
*** ../bash-4.0/builtins/declare.def	2009-01-04 14:32:22.000000000 -0500
Roman Rakus 2455014
--- builtins/declare.def	2009-02-26 11:40:16.000000000 -0500
Roman Rakus 2455014
***************
Roman Rakus 2455014
*** 296,299 ****
Roman Rakus 2455014
--- 296,306 ----
Roman Rakus 2455014
        if (t = strchr (name, '['))	/* ] */
Roman Rakus 2455014
  	{
Roman Rakus 2455014
+ 	  /* If offset != 0 we have already validated any array reference */
Roman Rakus 2455014
+ 	  if (offset == 0 && valid_array_reference (name) == 0)
Roman Rakus 2455014
+ 	    {
Roman Rakus 2455014
+ 	      sh_invalidid (name);
Roman Rakus 2455014
+ 	      assign_error++;
Roman Rakus 2455014
+ 	      NEXT_VARIABLE ();
Roman Rakus 2455014
+ 	    }
Roman Rakus 2455014
  	  subscript_start = t;
Roman Rakus 2455014
  	  *t = '\0';
Roman Rakus 2455014
***************
Roman Rakus 2455014
*** 485,489 ****
Roman Rakus 2455014
  	  /* declare -a name[[n]] or declare name[n] makes name an indexed
Roman Rakus 2455014
  	     array variable. */
Roman Rakus 2455014
! 	  else if ((making_array_special || (flags_on & att_array)) && array_p (var) == 0)
Roman Rakus 2455014
  	    var = convert_var_to_array (var);
Roman Rakus 2455014
  #endif /* ARRAY_VARS */
Roman Rakus 2455014
--- 492,496 ----
Roman Rakus 2455014
  	  /* declare -a name[[n]] or declare name[n] makes name an indexed
Roman Rakus 2455014
  	     array variable. */
Roman Rakus 2455014
! 	  else if ((making_array_special || (flags_on & att_array)) && array_p (var) == 0 && assoc_p (var) == 0)
Roman Rakus 2455014
  	    var = convert_var_to_array (var);
Roman Rakus 2455014
  #endif /* ARRAY_VARS */
Roman Rakus 2455014
*** ../bash-4.0/patchlevel.h	2009-01-04 14:32:40.000000000 -0500
Roman Rakus 2455014
--- patchlevel.h	2009-02-22 16:11:31.000000000 -0500
Roman Rakus 2455014
***************
Roman Rakus 2455014
*** 26,30 ****
Roman Rakus 2455014
     looks for to find the patch level (for the sccs version string). */
Roman Rakus 2455014
  
Roman Rakus 2455014
! #define PATCHLEVEL 4
Roman Rakus 2455014
  
Roman Rakus 2455014
  #endif /* _PATCHLEVEL_H_ */
Roman Rakus 2455014
--- 26,30 ----
Roman Rakus 2455014
     looks for to find the patch level (for the sccs version string). */
Roman Rakus 2455014
  
Roman Rakus 2455014
! #define PATCHLEVEL 5
Roman Rakus 2455014
  
Roman Rakus 2455014
  #endif /* _PATCHLEVEL_H_ */
Roman Rakus 2455014