search for: saveheredoclist

Displaying 2 results from an estimated 2 matches for "saveheredoclist".

2020 Mar 28
0
[klibc:update-dash] dash: parser: Save/restore here-documents in command substitution
...++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/usr/dash/parser.c b/usr/dash/parser.c index 8bd3db44..809c6a8a 100644 --- a/usr/dash/parser.c +++ b/usr/dash/parser.c @@ -1368,6 +1368,7 @@ parsebackq: { union node *n; char *str; size_t savelen; + struct heredoc *saveheredoclist; int uninitialized_var(saveprompt); str = NULL; @@ -1432,6 +1433,9 @@ done: *nlpp = (struct nodelist *)stalloc(sizeof (struct nodelist)); (*nlpp)->next = NULL; + saveheredoclist = heredoclist; + heredoclist = NULL; + if (oldstyle) { saveprompt = doprompt; doprompt = 0; @@ -14...
2020 Mar 28
0
[klibc:update-dash] dash: parser: Fix old-style command substitution here-document crash
...on(-) diff --git a/usr/dash/parser.c b/usr/dash/parser.c index 1f9e8ec0..4bda42e8 100644 --- a/usr/dash/parser.c +++ b/usr/dash/parser.c @@ -1451,9 +1451,9 @@ done: if (readtoken() != TRP) synexpect(TRP); setinputstring(nullstr); - parseheredoc(); } + parseheredoc(); heredoclist = saveheredoclist; (*nlpp)->n = n;