From 36f2c406ff27995392a9247dfa90672fdaf7dc43 Mon Sep 17 00:00:00 2001 From: Chet Ramey Date: Fri, 10 Jul 2020 11:29:25 -0400 Subject: [PATCH] Bash-5.0 patch 18: fix quoted null string removal when using shell word expansion pattern operators --- patchlevel.h | 2 +- subst.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/patchlevel.h b/patchlevel.h index 98e714da8..f0ee56e4c 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 8884b4879..843c9d395 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) -- 2.47.3