Blame SOURCES/bash-4.4-case-in-command-subst.patch

9014c4
diff --git a/parse.y b/parse.y
9014c4
--- a/parse.y
9014c4
+++ b/parse.y
9014c4
@@ -4011,11 +4011,13 @@ eof_error:
9014c4
 		  tflags |= LEX_RESWDOK;
9014c4
 		  lex_rwlen = 0;
9014c4
 		}
9014c4
-	       else
9014c4
+	       else if (shellmeta (ch) == 0)
9014c4
 		{
9014c4
 		  tflags &= ~LEX_RESWDOK;
9014c4
 /*itrace("parse_comsub:%d: found `%.4s', lex_reswdok -> 0", line_number, ret+retind-4);*/
9014c4
 		}
9014c4
+	      else	/* can't be in a reserved word any more */
9014c4
+	        lex_rwlen = 0;
9014c4
 	    }
9014c4
 	  else if MBTEST((tflags & LEX_CKCOMMENT) && ch == '#' && (lex_rwlen == 0 || ((tflags & LEX_INWORD) && lex_wlen == 0)))
9014c4
 	    ;	/* don't modify LEX_RESWDOK if we're starting a comment */