Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Fix complist menuselect segmentation fault
On Sun, 2 Jul 2017 16:58:20 +0200
Maxime de Roucy <maxime.deroucy@xxxxxxxxx> wrote:
> Without this patch :
>
> I use :
>
> zstyle ':completion:*:hosts' menu yes=long yes=20 select search
>
> Imagine I have 2 hosts : "ab" and "bb"
>
> When I try to use the completion menu ("isearch") and type "aa" the shell
> crash (segmentation fault).
>
> The first "a" match only host "ab", so when a type the second "a", mcol
> and mline == 0.
>
> The first time the code enter "if (x == ex && y == ey)", it leave the if
> with x = y = ex = ey = 0.
> Then "++x" (line 2331) increment x, and x and y can't match ex and ey
> anymore since they can only increase.
> → segmentation fault
Thanks --- the existing code here is obscure enough I think I'm just
going to apply your patch and see if anyone notices side effects. It
looks like they'd have to be pretty subtle --- I'm guessing that
problem has been there a very long time.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author