Blob Blame Raw
			     BASH PATCH REPORT
			     =================

Bash-Release:	4.2
Patch-ID:	bash42-019

Bug-Reported-by:	Diego Augusto Molina <diegoaugustomolina@gmail.com>
Bug-Reference-ID:	<CAGOxLdHcSQu3ck9Qy3pRjj_NBU5tAPSAvNm-95-nLQ9Szwb6aA@mail.gmail.com>
Bug-Reference-URL:	lists.gnu.org/archive/html/bug-bash/2011-09/msg00047.html

Bug-Description:

Using `declare' with attributes and an invalid array variable name or
assignment reference resulted in a segmentation fault instead of a
declaration error.

Patch (apply with `patch -p0'):

*** ../bash-4.2-patched/builtins/declare.def	2010-05-30 18:25:21.000000000 -0400
--- builtins/declare.def	2011-09-15 15:20:20.000000000 -0400
***************
*** 514,517 ****
--- 514,522 ----
  	      var = assign_array_element (name, value, 0);	/* XXX - not aflags */
  	      *subscript_start = '\0';
+ 	      if (var == 0)	/* some kind of assignment error */
+ 		{
+ 		  assign_error++;
+ 		  NEXT_VARIABLE ();
+ 		}
  	    }
  	  else if (simple_array_assign)
*** ../bash-4.2-patched/patchlevel.h	Sat Jun 12 20:14:48 2010
--- patchlevel.h	Thu Feb 24 21:41:34 2011
***************
*** 26,30 ****
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 18
  
  #endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 19
  
  #endif /* _PATCHLEVEL_H_ */