From d46446e26d2a526e6e304bc842c927fd3bc6737a Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Sun, 26 Jul 2015 20:26:30 +0200 Subject: Cherry-pick upstream fix for segfault upon $((…) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...-dont-add-to-raw-lex-buffer-if-lex-stopped.patch | 21 +++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 22 insertions(+) create mode 100644 debian/patches/cherry-pick-b3aa3b77-dont-add-to-raw-lex-buffer-if-lex-stopped.patch diff --git a/debian/patches/cherry-pick-b3aa3b77-dont-add-to-raw-lex-buffer-if-lex-stopped.patch b/debian/patches/cherry-pick-b3aa3b77-dont-add-to-raw-lex-buffer-if-lex-stopped.patch new file mode 100644 index 000000000..ac691372f --- /dev/null +++ b/debian/patches/cherry-pick-b3aa3b77-dont-add-to-raw-lex-buffer-if-lex-stopped.patch @@ -0,0 +1,21 @@ +Origin: commit b3aa3b77916007703b341bfd30c3647bdc355bc8 +Author: Peter Stephenson +Description: 35910: Don't add to raw lex buffer if lex stopped. + This was causing a segmentation violation in completion when parsing + an incomplete math expression, e.g. 'echo $((3*4)'. +Acked-By: Axel Beckert + +diff --git a/Src/input.c b/Src/input.c +index 613f89a..1efabad 100644 +--- a/Src/input.c ++++ b/Src/input.c +@@ -222,7 +222,8 @@ ingetc(void) + if (inputline()) + break; + } +- zshlex_raw_add(lastc); ++ if (!lexstop) ++ zshlex_raw_add(lastc); + return lastc; + } + diff --git a/debian/patches/series b/debian/patches/series index 7e18fd1e0..9bc19df7f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,3 +4,4 @@ cherry-pick-811027a2-fix-signal-queueing-in-zcontext_save_partial-790282.patch cherry-pick-7bc47c91-prompt_adam1_setup-fix-perl-5.22-warnings.patch cherry-pick-771381c2-fix-$((...))-completion-in-expand-or-complete-widget.patch cherry-pick-dd8079e0-fix-$((...))-completion-by-_expand-widget.patch +cherry-pick-b3aa3b77-dont-add-to-raw-lex-buffer-if-lex-stopped.patch -- cgit v1.2.3