about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--Src/Zle/computil.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 286c4037a..12b5b5b0c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-09-19  Peter Stephenson  <p.stephenson@samsung.com>
+
+	* Axel Beckert: 31735: Src/Zle/computil.c (get_cvdef):
+	off-by-one in obscure loop handling could cause crash in complex
+	completion.
+
 2013-09-14  Luka Perkov  <luka@openwrt.org>
 
 	* 31723: Completion/Unix/Command/_systemd: _systemd: add more
diff --git a/Src/Zle/computil.c b/Src/Zle/computil.c
index cd508d0ac..2c323eefe 100644
--- a/Src/Zle/computil.c
+++ b/Src/Zle/computil.c
@@ -2992,7 +2992,7 @@ get_cvdef(char *nam, char **args)
 	    return *p;
 	} else if (!min || !*p || (*p)->lastt < (*min)->lastt)
 	    min = p;
-    if (i)
+    if (i > 0)
 	min = p;
     if ((new = parse_cvdef(nam, args))) {
 	freecvdef(*min);