[Pkg-zsh-commits] [zsh] 01/01: Cherry-pick four stability patches from upstream
Axel Beckert
abe at deuxchevaux.org
Tue Jan 17 00:27:47 UTC 2017
This is an automated email from the git hooks/post-receive script.
abe pushed a commit to branch debian
in repository zsh.
commit 348c47bdc3b6a92558d82086d168e7829437388a
Author: Axel Beckert <abe at deuxchevaux.org>
Date: Tue Jan 17 01:21:33 2017 +0100
Cherry-pick four stability patches from upstream
---
...ff_POSIX_IDENTIFIERS_option_in_completion.patch | 15 ++++++
...ith_pattern_allocation_in_history_isearch.patch | 59 ++++++++++++++++++++++
...zero_new_space_allocated_in_prompt_buffer.patch | 15 ++++++
...setting_of_parameter_values_in_compvalues.patch | 18 +++++++
debian/patches/series | 4 ++
5 files changed, 111 insertions(+)
diff --git a/debian/patches/cherry-pick_2e76fb80_turn_off_POSIX_IDENTIFIERS_option_in_completion.patch b/debian/patches/cherry-pick_2e76fb80_turn_off_POSIX_IDENTIFIERS_option_in_completion.patch
new file mode 100644
index 0000000..87a28a1
--- /dev/null
+++ b/debian/patches/cherry-pick_2e76fb80_turn_off_POSIX_IDENTIFIERS_option_in_completion.patch
@@ -0,0 +1,15 @@
+Description: turn off POSIX_IDENTIFIERS option in completion
+Origin: 2e76fb80b4c228944b57b8f669e75456a23f147d
+Author: Peter Stephenson <pws at zsh.org>
+Reviewed-By: Axel Beckert <abe at debian.org>
+
+--- a/Completion/compinit
++++ b/Completion/compinit
+@@ -153,6 +153,7 @@
+ NO_markdirs
+ NO_octalzeroes
+ NO_posixbuiltins
++ NO_posixidentifiers
+ NO_shwordsplit
+ NO_shglob
+ NO_warncreateglobal
diff --git a/debian/patches/cherry-pick_48cadf48_be_more_careful_with_pattern_allocation_in_history_isearch.patch b/debian/patches/cherry-pick_48cadf48_be_more_careful_with_pattern_allocation_in_history_isearch.patch
new file mode 100644
index 0000000..f15f702
--- /dev/null
+++ b/debian/patches/cherry-pick_48cadf48_be_more_careful_with_pattern_allocation_in_history_isearch.patch
@@ -0,0 +1,59 @@
+Description: Be more careful with pattern allocation in history isearch.
+ If there are ZLE hooks to be called, they may use patterns, in
+ which case it's not safe to allocate the isearch pattern in the
+ static buffer.
+Origin: 48cadf48ff9c61ce09e826ad9a58e250e999a262
+Author: Peter Stephenson <pws at zsh.org>
+Reviewed-By: Daniel Shahaf <d.s at daniel.shahaf.name>
+
+--- a/Src/Zle/zle_hist.c
++++ b/Src/Zle/zle_hist.c
+@@ -1220,13 +1220,12 @@
+ char *patbuf = ztrdup(sbuf);
+ char *patstring;
+ /*
+- * Use static pattern buffer since we don't need
+- * to maintain it and won't call other pattern functions
+- * meanwhile.
++ * Do not use static pattern buffer (PAT_STATIC) since we call zle hooks,
++ * which might call other pattern functions. Use PAT_ZDUP instead.
+ * Use PAT_NOANCH because we don't need the match
+ * anchored to the end, even if it is at the start.
+ */
+- int patflags = PAT_STATIC|PAT_NOANCH;
++ int patflags = PAT_ZDUP|PAT_NOANCH;
+ if (sbuf[0] == '^') {
+ /*
+ * We'll handle the anchor later when
+@@ -1521,6 +1520,7 @@
+ if (only_one || !top_spot || old_sbptr != sbptr)
+ break;
+ }
++ freepatprog(patprog);
+ patprog = NULL;
+ nosearch = 1;
+ skip_pos = 0;
+@@ -1632,6 +1632,7 @@
+ }
+ strcpy(sbuf + sbptr, paste);
+ sbptr += pastelen;
++ freepatprog(patprog);
+ patprog = NULL;
+ free(paste);
+ } else if (cmd == Th(z_acceptsearch)) {
+@@ -1682,6 +1683,7 @@
+ * always valid at this point.
+ */
+ sbptr += zlecharasstring(LASTFULLCHAR, sbuf + sbptr);
++ freepatprog(patprog);
+ patprog = NULL;
+ }
+ if (feep)
+@@ -1702,6 +1704,7 @@
+ zsfree(okeymap);
+ if (matchlist)
+ freematchlist(matchlist);
++ freepatprog(patprog);
+ isearch_active = 0;
+ /*
+ * Don't allow unused characters provided as a string to the
diff --git a/debian/patches/cherry-pick_8d4c9854_zero_new_space_allocated_in_prompt_buffer.patch b/debian/patches/cherry-pick_8d4c9854_zero_new_space_allocated_in_prompt_buffer.patch
new file mode 100644
index 0000000..acfcc2b
--- /dev/null
+++ b/debian/patches/cherry-pick_8d4c9854_zero_new_space_allocated_in_prompt_buffer.patch
@@ -0,0 +1,15 @@
+Description: zero new space allocated in prompt buffer
+Origin: 8d4c98540de9bcdba8565facc91fbc45855d27e2
+Author: Paulo Andrade <pandrade at redhat.com>
+Reviewed-By: Daniel Shahaf <d.s at daniel.shahaf.name>
+
+--- a/Src/prompt.c
++++ b/Src/prompt.c
+@@ -920,6 +920,7 @@
+ if(need & 255)
+ need = (need | 255) + 1;
+ bv->buf = realloc(bv->buf, bv->bufspc += need);
++ memset(bv->buf + bv->bufspc - need, 0, need);
+ bv->bp = bv->buf + bo;
+ if(bo1 != -1)
+ bv->bp1 = bv->buf + bo1;
diff --git a/debian/patches/cherry-pick_ebd7fdd9_fix_setting_of_parameter_values_in_compvalues.patch b/debian/patches/cherry-pick_ebd7fdd9_fix_setting_of_parameter_values_in_compvalues.patch
new file mode 100644
index 0000000..3ab0710
--- /dev/null
+++ b/debian/patches/cherry-pick_ebd7fdd9_fix_setting_of_parameter_values_in_compvalues.patch
@@ -0,0 +1,18 @@
+Description: Fix setting of parameter values in compvalues
+Origin: ebd7fdd9326cf36feda3b0ca906d7b9b8bf79cb5
+Author: Peter Stephenson <p.w.stephenson at ntlworld.com>
+Reviewed-By: Daniel Shahaf <d.s at daniel.shahaf.name>
+
+--- a/Src/Zle/computil.c
++++ b/Src/Zle/computil.c
+@@ -3546,8 +3546,8 @@
+ Cvval val = cv_get_val(cv_laststate.d, args[1]);
+
+ if (val && val->arg) {
+- setsparam(args[2], val->arg->descr);
+- setsparam(args[3], val->arg->action);
++ setsparam(args[2], ztrdup(val->arg->descr));
++ setsparam(args[3], ztrdup(val->arg->action));
+
+ if (args[4])
+ setsparam(args[4], ztrdup(val->name));
diff --git a/debian/patches/series b/debian/patches/series
index 90d273e..21838bb 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,7 @@ update-debian-sections.patch
remove-SH_USE_BSD_ECHO-autoconf-test-to-make-build-more-reproducible.patch
update_bts_completion.patch
swaks_completion.patch
+cherry-pick_8d4c9854_zero_new_space_allocated_in_prompt_buffer.patch
+cherry-pick_48cadf48_be_more_careful_with_pattern_allocation_in_history_isearch.patch
+cherry-pick_ebd7fdd9_fix_setting_of_parameter_values_in_compvalues.patch
+cherry-pick_2e76fb80_turn_off_POSIX_IDENTIFIERS_option_in_completion.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/zsh.git
More information about the Pkg-zsh-commits
mailing list