Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH 2/2] clear the heredoc list in case par_event() fails



... in order to prevent SIGSEGV on the following input when running
in the interactive mode:

<<X;'
^C

^C

The console output looks like this:
kdudka% <<X;'
quote>
kdudka%
heredoc>
zsh: segmentation fault (core dumped)  zsh -f

Bug: https://bugzilla.redhat.com/972624
---
 Src/parse.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Src/parse.c b/Src/parse.c
index 91a81e1..374d18b 100644
--- a/Src/parse.c
+++ b/Src/parse.c
@@ -605,6 +605,7 @@ par_event(int endtok)
 	if (!par_event(endtok)) {
 	    ecused = oec;
 	    ecbuf[p] |= wc_bdata(Z_END);
+	    clear_hdocs();
 	}
     }
     return 1;
-- 
2.1.0



Messages sorted by: Reverse Date, Date, Thread, Author