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

Re: completion in quotes - " vs ' - no suffix added

Bart Schaefer wrote:

> On May 14,  2:23pm, Bart Schaefer wrote:
> }
> } -rw-rw-r--   1 schaefer schaefer        0 May 13 10:29 a\ b
> } drwxrwxr-x   2 schaefer schaefer     1024 May 13 10:29 a\ d/
> } schaefer<503> zsh -c "ls a<TAB>
> } schaefer<503> zsh -c "ls a\\\\\\ 
> It's worse than that -- if I type TAB again at this point, the shell
> crashes.

The number of backslashes is ok.

But the segv not, obviously. A quick check shows that there's another
bug in the zle_tricky code, similar to the one I fixed in that other
patch -- only this time it's with double quotes, whereas the other one
was with single quotes. One of the effects of these bugs is that the
`x' inserted into the line stays there so the completion code gets to
see it. With this bug I guess this means the code calls chuck() with a
pointer pointing to the null byte at the end of the string, messing up
the following memory.

But this might take more time, so it'll have to wait until I get home
but I hope to send a patch tomorrow. Sorry.


Sven Wischnowsky                          wischnow@xxxxxxxxx

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