Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: Completion/User/_cvs again.



Tanaka Akira wrote:

> Also, I found that `cvs diff <TAB>' causes core dump.
> 
> Z(2):akr@is27e1u11% Src/zsh -f                          
> is27e1u11% bindkey -e; fpath=($PWD/Completion/*(/)); autoload -U compinit; compinit -D; compdef _tst tst
> is27e1u11% compconf group_matches=yes message_format='%d' description_format='%d' describe_options=yes   
> is27e1u11% cvs diff zsh: segmentation fault (core dumped)  Src/zsh -f

Whoa! `bslashquote()' used a static buffer -- too short for long lists 
like these (called via the `(q)' param flag).

Bart: `bslashquote()' is basically the `quotename()' from zle_tricky.c,
      I think we should change it there, too.


Bye
 Sven

diff -u os/utils.c Src/utils.c
--- os/utils.c	Tue Sep  7 13:15:41 1999
+++ Src/utils.c	Wed Sep  8 10:15:50 1999
@@ -2963,7 +2963,8 @@
 bslashquote(const char *s, char **e, int instring)
 {
     const char *u, *tt;
-    char *v, buf[PATH_MAX * 2];
+    char *v;
+    VARARR(char, buf, 2 * strlen(s) + 1);
     int sf = 0;
 
     tt = v = buf;

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author