[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#41232: [PATCH] Avoid a segfault when processing disable-eval specs
From: |
Clément Pit-Claudel |
Subject: |
bug#41232: [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.
0001-Fix-a-crash-in-handle_display_spec.patch
Description: Text Data
- bug#41232: [PATCH] Avoid a segfault when processing disable-eval specs,
Clément Pit-Claudel <=