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

Re: [BUG] Zsh crashes when using autocomplete because of memory unsafety (double free)



On Sun, Jun 28, 2020 at 12:35 PM Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> Here's the patch again in case HTML mangled it for the previous message:

Sigh, I didn't think it could be this simple.  Now instead of
segfaulting with the cursor between the single quote and the double
quote, it segfaults if the cursor is after the double quote:

% alias a='"<TAB>
16: compcore.c:1678: expecting 'x' at offset -1 of "x""

Program received signal SIGSEGV, Segmentation fault.

Also with completeinword NOT set, the single quote still vanishes in this case:

% alias a='<TAB>
% alias a=

So the patch is sort of on the right track, but still not the whole
story.  Turning this back over to others, I probably won't have a
chance to look at it again for a few days.



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