summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2020-07-10 11:29:25 -0400
committerChet Ramey <chet.ramey@case.edu>2020-07-10 11:29:25 -0400
commit36f2c406ff27995392a9247dfa90672fdaf7dc43 (patch)
treea43ed9445245cf411511b2ad90d005854a67d049
parent9e49d343e3cd7e20dad1b86ebfb764e8027596a7 (diff)
downloadbash-36f2c406ff27995392a9247dfa90672fdaf7dc43.tar.gz
Bash-5.0 patch 18: fix quoted null string removal when using shell word expansion pattern operators
-rw-r--r--patchlevel.h2
-rw-r--r--subst.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/patchlevel.h b/patchlevel.h
index 98e714da..f0ee56e4 100644
--- a/patchlevel.h
+++ b/patchlevel.h
@@ -25,6 +25,6 @@
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
looks for to find the patch level (for the sccs version string). */
-#define PATCHLEVEL 17
+#define PATCHLEVEL 18
#endif /* _PATCHLEVEL_H_ */
diff --git a/subst.c b/subst.c
index 8884b487..843c9d39 100644
--- a/subst.c
+++ b/subst.c
@@ -5112,6 +5112,8 @@ getpattern (value, quoted, expandpat)
(quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) ? Q_PATQUOTE : quoted,
(int *)NULL, (int *)NULL)
: (WORD_LIST *)0;
+ if (l)
+ word_list_remove_quoted_nulls (l);
pat = string_list (l);
dispose_words (l);
if (pat)