bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#50376: 28.0.50; Counsel M-x completion segfaults in command-modes


From: Eli Zaretskii
Subject: bug#50376: 28.0.50; Counsel M-x completion segfaults in command-modes
Date: Sat, 04 Sep 2021 20:42:41 +0300

> Date: Sat, 04 Sep 2021 18:20:16 +0100
> From:  "Basil L. Contovounesios" via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> * src/data.c (Fcommand_modes): Check that bytecode object is
> interactive before accessing its interactive spec to avoid
> segfaulting.
> ---
>  src/data.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/data.c b/src/data.c
> index ffca7e7535..27b642df28 100644
> --- a/src/data.c
> +++ b/src/data.c
> @@ -1045,6 +1045,8 @@ DEFUN ("command-modes", Fcommand_modes, Scommand_modes, 
> 1, 1, 0,
>  
>    if (COMPILEDP (fun))
>      {
> +      if (PVSIZE (fun) <= COMPILED_INTERACTIVE)
> +     return Qnil;
>        Lisp_Object form = AREF (fun, COMPILED_INTERACTIVE);
>        if (VECTORP (form))
>       /* New form -- the second element is the command modes. */

LGTM, thanks.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]