GNU bug report logs - #41232
[PATCH] Avoid a segfault when processing disable-eval specs

Previous Next

Package: emacs;

Reported by: Clément Pit-Claudel <cpitclaudel <at> gmail.com>

Date: Wed, 13 May 2020 14:41:01 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 41232 in the body.
You can then email your comments to 41232 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#41232; Package emacs. (Wed, 13 May 2020 14:41:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Clément Pit-Claudel <cpitclaudel <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 13 May 2020 14:41:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Clément Pit-Claudel <cpitclaudel <at> gmail.com>
To: bug-gnu-emacs <bug-gnu-emacs <at> gnu.org>
Subject: [PATCH] Avoid a segfault when processing disable-eval specs
Date: Wed, 13 May 2020 10:40:18 -0400
[Message part 1 (text/plain, inline)]
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.
[0001-Fix-a-crash-in-handle_display_spec.patch (text/x-patch, attachment)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Wed, 13 May 2020 15:55:02 GMT) Full text and rfc822 format available.

Notification sent to Clément Pit-Claudel <cpitclaudel <at> gmail.com>:
bug acknowledged by developer. (Wed, 13 May 2020 15:55:02 GMT) Full text and rfc822 format available.

Message #10 received at 41232-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Clément Pit-Claudel <cpitclaudel <at> gmail.com>
Cc: 41232-done <at> debbugs.gnu.org
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 <cpitclaudel <at> gmail.com>
> 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.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 11 Jun 2020 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 66 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.