Bash-5.0 patch 18: fix quoted null string removal when using shell word expansion pattern operators

This commit is contained in:
Chet Ramey
2020-07-10 11:29:25 -04:00
parent 9e49d343e3
commit 36f2c406ff
2 changed files with 3 additions and 1 deletions

View File

@@ -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_ */

View File

@@ -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)