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

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

bug#41232: closed ([PATCH] Avoid a segfault when processing disable-eval


From: GNU bug Tracking System
Subject: bug#41232: closed ([PATCH] Avoid a segfault when processing disable-eval specs)
Date: Wed, 13 May 2020 15:55:02 +0000

Your message dated Wed, 13 May 2020 18:54:35 +0300
with message-id <address@hidden>
and subject line Re: bug#41232: [PATCH] Avoid a segfault when processing 
disable-eval specs
has caused the debbugs.gnu.org bug report #41232,
regarding [PATCH] Avoid a segfault when processing disable-eval specs
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden.)


-- 
41232: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=41232
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: [PATCH] Avoid a segfault when processing disable-eval specs Date: Wed, 13 May 2020 10:40:18 -0400 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0
The following code causes Emacs to segfault:

  (insert (propertize "A" 'display '(disable-eval . nil)))

This is due to this code, which takes an XCAR without checking whether the spec 
is a cons:

  /* Support (disable-eval PROP) which is used by enriched.el.  */
  if (CONSP (spec) && EQ (XCAR (spec), Qdisable_eval))
    {
      enable_eval = false;
      spec = XCAR (XCDR (spec));
    }

The attached patch fixes this.

Attachment: 0001-Fix-a-crash-in-handle_display_spec.patch
Description: Text Data


--- End Message ---
--- Begin Message --- Subject: Re: bug#41232: [PATCH] Avoid a segfault when processing disable-eval specs Date: Wed, 13 May 2020 18:54:35 +0300
> From: Clément Pit-Claudel <address@hidden>
> Date: Wed, 13 May 2020 10:40:18 -0400
> 
> The following code causes Emacs to segfault:
> 
>   (insert (propertize "A" 'display '(disable-eval . nil)))
> 
> This is due to this code, which takes an XCAR without checking whether the 
> spec is a cons:
> 
>   /* Support (disable-eval PROP) which is used by enriched.el.  */
>   if (CONSP (spec) && EQ (XCAR (spec), Qdisable_eval))
>     {
>       enable_eval = false;
>       spec = XCAR (XCDR (spec));
>     }
> 
> The attached patch fixes this.

Thanks, installed.


--- End Message ---

reply via email to

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