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.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Clément Pit-Claudel <cpitclaudel <at> gmail.com>
Subject: bug#41232: closed (Re: bug#41232: [PATCH] Avoid a segfault when
 processing disable-eval specs)
Date: Wed, 13 May 2020 15:55:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#41232: [PATCH] Avoid a segfault when processing disable-eval specs

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 41232 <at> debbugs.gnu.org.

-- 
41232: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=41232
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
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.

[Message part 3 (message/rfc822, inline)]
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 4 (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)]

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

Previous Next


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