Roman Rakus 245501
			     BASH PATCH REPORT
Roman Rakus 245501
			     =================
Roman Rakus 245501
Roman Rakus 245501
Bash-Release: 4.0
Roman Rakus 245501
Patch-ID: bash40-010
Roman Rakus 245501
Roman Rakus 245501
Bug-Reported-by:	Mike Frysinger <vapier@gentoo.org>
Roman Rakus 245501
Bug-Reference-ID:	<200903030122.56206.vapier@gentoo.org>
Roman Rakus 245501
Bug-Reference-URL:	http://lists.gnu.org/archive/html/bug-bash/2009-03/msg00023.html
Roman Rakus 245501
Roman Rakus 245501
Bug-Description:
Roman Rakus 245501
Roman Rakus 245501
Bash has problems parsing comments in case statements when they appear in
Roman Rakus 245501
$(...) subshells.
Roman Rakus 245501
Roman Rakus 245501
Patch:
Roman Rakus 245501
Roman Rakus 245501
*** ../bash-4.0/parse.y	2009-03-07 15:18:35.000000000 -0500
Roman Rakus 245501
--- parse.y	2009-03-07 14:16:32.000000000 -0500
Roman Rakus 245501
***************
Roman Rakus 245501
*** 3413,3419 ****
Roman Rakus 245501
  	      tflags &= ~LEX_RESWDOK;
Roman Rakus 245501
  	    }
Roman Rakus 245501
! 	  else if (shellbreak (ch) == 0)
Roman Rakus 245501
  {
Roman Rakus 245501
! 	      tflags &= ~LEX_RESWDOK;
Roman Rakus 245501
  /*itrace("parse_comsub:%d: found `%c', lex_reswordok -> 0", line_number, ch);*/
Roman Rakus 245501
  }
Roman Rakus 245501
--- 3415,3433 ----
Roman Rakus 245501
  	      tflags &= ~LEX_RESWDOK;
Roman Rakus 245501
  	    }
Roman Rakus 245501
! 	  else if MBTEST((tflags & LEX_CKCOMMENT) && ch == '#' && (lex_rwlen == 0 || ((tflags & LEX_INWORD) && lex_wlen == 0)))
Roman Rakus 245501
! 	    ;	/* don't modify LEX_RESWDOK if we're starting a comment */
Roman Rakus 245501
! 	  else if MBTEST((tflags & LEX_INCASE) && ch != '\n')
Roman Rakus 245501
! 	    /* If we can read a reserved word and we're in case, we're at the
Roman Rakus 245501
! 	       point where we can read a new pattern list or an esac.  We
Roman Rakus 245501
! 	       handle the esac case above.  If we read a newline, we want to
Roman Rakus 245501
! 	       leave LEX_RESWDOK alone.  If we read anything else, we want to
Roman Rakus 245501
! 	       turn off LEX_RESWDOK, since we're going to read a pattern list. */
Roman Rakus 245501
  {
Roman Rakus 245501
! 	    tflags &= ~LEX_RESWDOK;
Roman Rakus 245501
! /*itrace("parse_comsub:%d: lex_incase == 1 found `%c', lex_reswordok -> 0", line_number, ch);*/
Roman Rakus 245501
! }
Roman Rakus 245501
! 	  else if MBTEST(shellbreak (ch) == 0)
Roman Rakus 245501
! {
Roman Rakus 245501
! 	    tflags &= ~LEX_RESWDOK;
Roman Rakus 245501
  /*itrace("parse_comsub:%d: found `%c', lex_reswordok -> 0", line_number, ch);*/
Roman Rakus 245501
  }
Roman Rakus 245501
*** ../bash-4.0/patchlevel.h	2009-01-04 14:32:40.000000000 -0500
Roman Rakus 245501
--- patchlevel.h	2009-02-22 16:11:31.000000000 -0500
Roman Rakus 245501
***************
Roman Rakus 245501
*** 26,30 ****
Roman Rakus 245501
     looks for to find the patch level (for the sccs version string). */
Roman Rakus 245501
  
Roman Rakus 245501
! #define PATCHLEVEL 9
Roman Rakus 245501
  
Roman Rakus 245501
  #endif /* _PATCHLEVEL_H_ */
Roman Rakus 245501
--- 26,30 ----
Roman Rakus 245501
     looks for to find the patch level (for the sccs version string). */
Roman Rakus 245501
  
Roman Rakus 245501
! #define PATCHLEVEL 10
Roman Rakus 245501
  
Roman Rakus 245501
  #endif /* _PATCHLEVEL_H_ */