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)



(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