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)
- X-seq: zsh-workers 46164
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Subject: Re: [BUG] Zsh crashes when using autocomplete because of memory unsafety (double free)
- Date: Sun, 28 Jun 2020 12:35:54 -0700
- In-reply-to: <CAH+w=7ZG2Gg1eby+qU62iLrB5cvshhqokvPCd9cKFdmJ4u_GzA@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <00cb28e8-004e-2c8c-e02d-6063f4079c1d@soptik.tech> <20200626162405.4a7d28c1@tarpaulin.shahaf.local2> <CAH+w=7YVxqB5-TSO8QNvJajjv_MxnmWijd9PX=wkzXNu-GKGmg@mail.gmail.com> <CAH+w=7ZG2Gg1eby+qU62iLrB5cvshhqokvPCd9cKFdmJ4u_GzA@mail.gmail.com>
- Sender: zsh-workers@xxxxxxx
(Apologies that the previous post was not in plain text mode, gmail
reacts to the type of the message being replied-to ...)
On Sun, Jun 28, 2020 at 12:27 PM Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> With this change the vanishing quote mark no longer vanishes and a description appears:
>
This might actually fix some other obscure bugs/oddities in completion
where things mysteriously disappear from the command line.
Here's the patch again in case HTML mangled it for the previous message:
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index fdd1687..2c24a13 100644
--- a/Src/Zle/zle_tricky.c
+++ b/Src/Zle/zle_tricky.c
@@ -1897,6 +1897,7 @@ get_comp_string(void)
zlemetacs = wb;
}
we -= skipchars;
+ offs -= skipchars;
}
} else {
ocs = zlemetacs;
@@ -1910,6 +1911,7 @@ get_comp_string(void)
if (wb > zlemetacs)
zlemetacs = wb;
we -= skipchars;
+ offs -= skipchars;
}
/* we need to get rid of all the quotation bits... */
while (skipchars--)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author