Roman Rakus 928cba
			     BASH PATCH REPORT
Roman Rakus 928cba
			     =================
Roman Rakus 928cba
Roman Rakus 928cba
Bash-Release: 4.0
Roman Rakus 928cba
Patch-ID: bash40-022
Roman Rakus 928cba
Roman Rakus 928cba
Bug-Reported-by:  Bernd Eggink <monoped@sudrala.de>
Roman Rakus 928cba
Bug-Reference-ID: <49E65407.5010206@sudrala.de>
Roman Rakus 928cba
Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2009-04/msg00118.html
Roman Rakus 928cba
Roman Rakus 928cba
Bug-Description:
Roman Rakus 928cba
Roman Rakus 928cba
When parsing case statements in command substitutions, the shell did not
Roman Rakus 928cba
note that a newline is a shell metacharacter and can legally be followed
Roman Rakus 928cba
by a reserved word (e.g., `esac').
Roman Rakus 928cba
Roman Rakus 928cba
Patch:
Roman Rakus 928cba
Roman Rakus 928cba
*** ../bash-4.0-patched/parse.y	2009-03-08 21:24:47.000000000 -0400
Roman Rakus 928cba
--- parse.y	2009-04-15 22:27:56.000000000 -0400
Roman Rakus 928cba
***************
Roman Rakus 928cba
*** 3355,3359 ****
Roman Rakus 928cba
  
Roman Rakus 928cba
        /* Meta-characters that can introduce a reserved word.  Not perfect yet. */
Roman Rakus 928cba
!       if MBTEST((tflags & LEX_RESWDOK) == 0 && (tflags & LEX_CKCASE) && (tflags & LEX_INCOMMENT) == 0 && shellmeta(ch))
Roman Rakus 928cba
  	{
Roman Rakus 928cba
  	  /* Add this character. */
Roman Rakus 928cba
--- 3375,3379 ----
Roman Rakus 928cba
  
Roman Rakus 928cba
        /* Meta-characters that can introduce a reserved word.  Not perfect yet. */
Roman Rakus 928cba
!       if MBTEST((tflags & LEX_RESWDOK) == 0 && (tflags & LEX_CKCASE) && (tflags & LEX_INCOMMENT) == 0 && (shellmeta(ch) || ch == '\n'))
Roman Rakus 928cba
  	{
Roman Rakus 928cba
  	  /* Add this character. */
Roman Rakus 928cba
*** ../bash-4.0/patchlevel.h	2009-01-04 14:32:40.000000000 -0500
Roman Rakus 928cba
--- patchlevel.h	2009-02-22 16:11:31.000000000 -0500
Roman Rakus 928cba
***************
Roman Rakus 928cba
*** 26,30 ****
Roman Rakus 928cba
     looks for to find the patch level (for the sccs version string). */
Roman Rakus 928cba
  
Roman Rakus 928cba
! #define PATCHLEVEL 21
Roman Rakus 928cba
  
Roman Rakus 928cba
  #endif /* _PATCHLEVEL_H_ */
Roman Rakus 928cba
--- 26,30 ----
Roman Rakus 928cba
     looks for to find the patch level (for the sccs version string). */
Roman Rakus 928cba
  
Roman Rakus 928cba
! #define PATCHLEVEL 22
Roman Rakus 928cba
  
Roman Rakus 928cba
  #endif /* _PATCHLEVEL_H_ */