diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2007-08-22 17:24:08 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2007-08-22 17:24:08 +0000 |
commit | d931eed82655f1cbb54e7e1749642c8965e6d414 (patch) | |
tree | 8f9b88a70a1a6cb985ff46eb6d78087d733850dd | |
parent | 749951e03d1d6036f97a45b65c0a7a85c2eecabd (diff) | |
download | zsh-d931eed82655f1cbb54e7e1749642c8965e6d414.tar.gz zsh-d931eed82655f1cbb54e7e1749642c8965e6d414.tar.xz zsh-d931eed82655f1cbb54e7e1749642c8965e6d414.zip |
23794: fix crash completing on "foo$" (quotes significant)
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | Src/Zle/compresult.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index 78a9684b1..7f81ce31a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2007-08-22 Peter Stephenson <pws@csr.com> + * 23794: Src/Zle/compresult.c: completing on 'echo "foo$"<TAB>' + was broken. The code is as opaque as usual but preventing the + crash seems straightforward. + * 23792: Doc/Zsh/expn.yo, Test/D07multibyte.ztst: test and documentation for 23784. diff --git a/Src/Zle/compresult.c b/Src/Zle/compresult.c index 62a35122f..021330ddb 100644 --- a/Src/Zle/compresult.c +++ b/Src/Zle/compresult.c @@ -1148,7 +1148,7 @@ do_single(Cmatch m) makesuffixstr(m->remf, m->rems, 1); } } - if (minfo.we && partest && isset(AUTOPARAMKEYS)) { + if (minfo.we && partest && isset(AUTOPARAMKEYS) && minfo.insc - parq > 0) { /* the suffix code needs numbers of characters, not octets */ int outlen; char *tmpstr = dupstrpfx(zlemetaline + parq, minfo.insc - parq); |