]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
Bash-5.2 patch 21: fix for expanding command substitutions in a word expansion in...
authorChet Ramey <chet.ramey@case.edu>
Thu, 9 Nov 2023 21:48:34 +0000 (16:48 -0500)
committerChet Ramey <chet.ramey@case.edu>
Thu, 9 Nov 2023 21:48:34 +0000 (16:48 -0500)
patchlevel.h
subst.c

index 2db9d9cea4febf53f673fb37577c4dc25cf16c15..1712b108f073b4febac77414d3f6e2a2970c93f4 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 20
+#define PATCHLEVEL 21
 
 #endif /* _PATCHLEVEL_H_ */
diff --git a/subst.c b/subst.c
index 1ac6eb2d911650b3d6ecccab619183d136a3f524..0dfabfea9a17bf7b23af2859cea88cc62e3c39f6 100644 (file)
--- a/subst.c
+++ b/subst.c
@@ -1693,7 +1693,7 @@ extract_heredoc_dolbrace_string (string, sindex, quoted, flags)
          t = extract_command_subst (string, &si, flags);
          CHECK_STRING_OVERRUN (i, si, slen, c);
 
-         tlen = si - i - 1;
+         tlen = si - i - 2;
          RESIZE_MALLOCED_BUFFER (result, result_index, tlen + 4, result_size, 64);
          result[result_index++] = c;
          result[result_index++] = LPAREN;
@@ -1713,7 +1713,7 @@ extract_heredoc_dolbrace_string (string, sindex, quoted, flags)
          t = extract_process_subst (string, (string[i] == '<' ? "<(" : ">)"), &si, flags);
          CHECK_STRING_OVERRUN (i, si, slen, c);
 
-         tlen = si - i - 1;
+         tlen = si - i - 2;
          RESIZE_MALLOCED_BUFFER (result, result_index, tlen + 4, result_size, 64);
          result[result_index++] = c;
          result[result_index++] = LPAREN;