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

Re: clwords bugfix



> There is a bug in zle_tricky.c (ooh, what a surprise).  When the
> clwords array needs to be resized, the new part of the array is
> supposed to be initialised to NULLs.  The current version has
> an off-by-one error, meaning that it clears the current element
> (which is immediately freed, so there is only a memory leak here),
> but it doesn't clear the new last element (this causes crashes).
> The patch below fixes this, and changes it to use a looped assignment
> rather than memset, as NULL is not all-bits-zero on all machines.
> 
>  -zefram

What Unix has a NULL that isn't all-bits-zero?  That would break
a tremendous amount of code.  There all lots of places in zsh
that assume this and use memset.  I don't think we should change
this.

rc




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