]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
Bash-5.0 patch 11: fix quoted null character removal in operands of conditional ...
authorChet Ramey <chet.ramey@case.edu>
Thu, 29 Aug 2019 15:21:20 +0000 (11:21 -0400)
committerChet Ramey <chet.ramey@case.edu>
Thu, 29 Aug 2019 15:21:20 +0000 (11:21 -0400)
patchlevel.h
subst.c

index 8002af7092df8defdf9b412634e5235230357ee2..772676c8135fe7ef5f65e594d77e988e46ca69cb 100644 (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 10
+#define PATCHLEVEL 11
 
 #endif /* _PATCHLEVEL_H_ */
diff --git a/subst.c b/subst.c
index 95591878ca568903f93e3cdd5b5dd9a35bf095bf..fd6db240067ecc4253d7a1aba483751ed8265ff5 100644 (file)
--- a/subst.c
+++ b/subst.c
@@ -3625,7 +3625,9 @@ remove_backslashes (string)
    this case, we quote the string specially for the globbing code.  If
    SPECIAL is 2, this is an rhs argument for the =~ operator, and should
    be quoted appropriately for regcomp/regexec.  The caller is responsible
-   for removing the backslashes if the unquoted word is needed later. */   
+   for removing the backslashes if the unquoted word is needed later. In
+   any case, since we don't perform word splitting, we need to do quoted
+   null character removal. */
 char *
 cond_expand_word (w, special)
      WORD_DESC *w;
@@ -3646,6 +3648,8 @@ cond_expand_word (w, special)
     {
       if (special == 0)                        /* LHS */
        {
+         if (l->word)
+           word_list_remove_quoted_nulls (l);
          dequote_list (l);
          r = string_list (l);
        }