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

BUG: compdescribe/computils.c causing seg fault



There is a bug in compdescribe.  One place that it is tickled is on line 109 in
_describe. I encountered this bug will trying to complete args to the configure
command as "./configure --<TAB>"

This bug causes a seg. fault.  The problem happens in the computils.c file.

616       int dlen = columns - cd_state.gpre - cd_state.slen;

At line 616, the computed value of dlen is negative which causes problems. 
It's not clear to me why this should always be a positive number.  The value of
cd_state.gpre is set at line 316, and is just a sum.  There is nothing that
limits the value.  I was seeing cd_state.gpre have a value of 360+ (this was
the sum of 24 values from wids[]), while columns was 80.

This took a little time to track down.  One thing that would have been useful
in this case, would be some sort of check on values used for VARARR and alloc
particularly with the memory debugging flags set.

-FR.


__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com



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