Roman Rakus 3a5a59
			     BASH PATCH REPORT
Roman Rakus 3a5a59
			     =================
Roman Rakus 3a5a59
Roman Rakus 3a5a59
Bash-Release:	4.2
Roman Rakus 3a5a59
Patch-ID:	bash42-017
Roman Rakus 3a5a59
Roman Rakus 3a5a59
Bug-Reported-by:	Curtis Doty <Curtis@GreenKey.net>
Roman Rakus 3a5a59
Bug-Reference-ID:	<20110621035324.A4F70849F59@mx1.iParadigms.net>
Roman Rakus 3a5a59
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2011-06/msg00053.html
Roman Rakus 3a5a59
Roman Rakus 3a5a59
Bug-Description:
Roman Rakus 3a5a59
Roman Rakus 3a5a59
Using `read -a foo' where foo was an already-declared associative array
Roman Rakus 3a5a59
caused the shell to die with a segmentation fault.
Roman Rakus 3a5a59
Roman Rakus 3a5a59
Patch (apply with `patch -p0'):
Roman Rakus 3a5a59
Roman Rakus 3a5a59
*** ../bash-4.2-patched/builtins/read.def	2011-01-04 11:43:36.000000000 -0500
Roman Rakus 3a5a59
--- builtins/read.def	2011-06-21 10:31:02.000000000 -0400
Roman Rakus 3a5a59
***************
Roman Rakus 3a5a59
*** 643,646 ****
Roman Rakus 3a5a59
--- 642,651 ----
Roman Rakus 3a5a59
  	  return EXECUTION_FAILURE;	/* readonly or noassign */
Roman Rakus 3a5a59
  	}
Roman Rakus 3a5a59
+       if (assoc_p (var))
Roman Rakus 3a5a59
+ 	{
Roman Rakus 3a5a59
+           builtin_error (_("%s: cannot convert associative to indexed array"), arrayname);
Roman Rakus 3a5a59
+ 	  xfree (input_string);
Roman Rakus 3a5a59
+ 	  return EXECUTION_FAILURE;	/* existing associative array */
Roman Rakus 3a5a59
+ 	}
Roman Rakus 3a5a59
        array_flush (array_cell (var));
Roman Rakus 3a5a59
  
Roman Rakus 3a5a59
*** ../bash-4.2-patched/patchlevel.h	Sat Jun 12 20:14:48 2010
Roman Rakus 3a5a59
--- patchlevel.h	Thu Feb 24 21:41:34 2011
Roman Rakus 3a5a59
***************
Roman Rakus 3a5a59
*** 26,30 ****
Roman Rakus 3a5a59
     looks for to find the patch level (for the sccs version string). */
Roman Rakus 3a5a59
  
Roman Rakus 3a5a59
! #define PATCHLEVEL 16
Roman Rakus 3a5a59
  
Roman Rakus 3a5a59
  #endif /* _PATCHLEVEL_H_ */
Roman Rakus 3a5a59
--- 26,30 ----
Roman Rakus 3a5a59
     looks for to find the patch level (for the sccs version string). */
Roman Rakus 3a5a59
  
Roman Rakus 3a5a59
! #define PATCHLEVEL 17
Roman Rakus 3a5a59
  
Roman Rakus 3a5a59
  #endif /* _PATCHLEVEL_H_ */