From 82308f803402a03c992bf51340bcb54829a9665d Mon Sep 17 00:00:00 2001 From: Packit Service Date: Jan 12 2021 06:13:46 +0000 Subject: Apply patch bash-4.4-case-in-command-subst.patch patch_name: bash-4.4-case-in-command-subst.patch present_in_specfile: true location_in_specfile: 49 --- diff --git a/parse.y b/parse.y index 9d1cdf8..9a14cc0 100644 --- a/parse.y +++ b/parse.y @@ -4011,11 +4011,13 @@ eof_error: tflags |= LEX_RESWDOK; lex_rwlen = 0; } - else + else if (shellmeta (ch) == 0) { tflags &= ~LEX_RESWDOK; /*itrace("parse_comsub:%d: found `%.4s', lex_reswdok -> 0", line_number, ret+retind-4);*/ } + else /* can't be in a reserved word any more */ + lex_rwlen = 0; } else if MBTEST((tflags & LEX_CKCOMMENT) && ch == '#' && (lex_rwlen == 0 || ((tflags & LEX_INWORD) && lex_wlen == 0))) ; /* don't modify LEX_RESWDOK if we're starting a comment */