diff options
| author | Axel Beckert <abe@deuxchevaux.org> | 2013-09-18 23:50:04 +0200 |
|---|---|---|
| committer | Peter Stephenson <pws@zsh.org> | 2013-09-19 09:45:45 +0100 |
| commit | 844e569b632fc032576edc039f793be47fde724e (patch) | |
| tree | 06b65b3960828de9569f7d1460594339fbd59576 | |
| parent | 31726: _git: add few more arguments for cherry-pick and revert (diff) | |
| download | zsh-844e569b632fc032576edc039f793be47fde724e.tar zsh-844e569b632fc032576edc039f793be47fde724e.tar.gz zsh-844e569b632fc032576edc039f793be47fde724e.tar.bz2 zsh-844e569b632fc032576edc039f793be47fde724e.tar.lz zsh-844e569b632fc032576edc039f793be47fde724e.tar.xz zsh-844e569b632fc032576edc039f793be47fde724e.tar.zst zsh-844e569b632fc032576edc039f793be47fde724e.zip | |
31735: fix off-by-one in completion utility cache code.
Was causing crashes in complex completions, particularly with taskwarrior
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rw-r--r-- | Src/Zle/computil.c | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -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); |
