diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2020-02-22 16:39:27 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2020-02-22 16:39:27 +0100 |
commit | 9a1a659707a18c29166c3e2977523102866d7aed (patch) | |
tree | 032d75ed04a949c4b9ad9279ee49b9fde7b1a597 | |
parent | e4a0612efdedca0182d444942c34317e9df28a27 (diff) | |
download | busybox-w32-9a1a659707a18c29166c3e2977523102866d7aed.tar.gz busybox-w32-9a1a659707a18c29166c3e2977523102866d7aed.tar.bz2 busybox-w32-9a1a659707a18c29166c3e2977523102866d7aed.zip |
ash: parser: Fix old-style command substitution here-document crash
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@gondor.apana.org.au>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | shell/ash.c | 2 |
1 files changed, 1 insertions, 1 deletions
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: { | |||
12877 | if (readtoken() != TRP) | 12877 | if (readtoken() != TRP) |
12878 | raise_error_unexpected_syntax(TRP); | 12878 | raise_error_unexpected_syntax(TRP); |
12879 | setinputstring(nullstr); | 12879 | setinputstring(nullstr); |
12880 | parseheredoc(); | ||
12881 | } | 12880 | } |
12882 | 12881 | ||
12882 | parseheredoc(); | ||
12883 | heredoclist = saveheredoclist; | 12883 | heredoclist = saveheredoclist; |
12884 | 12884 | ||
12885 | (*nlpp)->n = n; | 12885 | (*nlpp)->n = n; |