[git commit] ash: parser: Fix old-style command substitution here-document crash
Denys Vlasenko
vda.linux at googlemail.com
Sat Feb 22 15:39:27 UTC 2020
commit: https://git.busybox.net/busybox/commit/?id=9a1a659707a18c29166c3e2977523102866d7aed
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
Upstream commit:
Date: Fri, 29 Mar 2019 13:49:59 +0800
parser: Fix old-style command substitution here-document crash
... This is caused by the recent change to
save/restore here-docment list around command substitutions. In
doing so we must finish existing here-documents prior to restoring
the old here-document list. This is done for new-style command
substitutions but not for old-style.
This patch fixes it by doing it for both.
Fixes: 51e2d88d6e51 ("parser: Save/restore here-documents in...")
Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
shell/ash.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/shell/ash.c b/shell/ash.c
index 005d87ecf..83cac3fb0 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -12877,9 +12877,9 @@ parsebackq: {
if (readtoken() != TRP)
raise_error_unexpected_syntax(TRP);
setinputstring(nullstr);
- parseheredoc();
}
+ parseheredoc();
heredoclist = saveheredoclist;
(*nlpp)->n = n;
More information about the busybox-cvs
mailing list