[Top][All Lists]

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

emacs-27 368e140: Avoid crashes in 'defconst'

From: Eli Zaretskii
Subject: emacs-27 368e140: Avoid crashes in 'defconst'
Date: Sat, 20 Jun 2020 04:07:04 -0400 (EDT)

branch: emacs-27
commit 368e140660bf84e91c67c87c47b73cfb2ea25476
Author: Stephen Berman <stephen.berman@gmx.net>
Commit: Eli Zaretskii <eliz@gnu.org>

    Avoid crashes in 'defconst'
    * src/eval.c (Fdefconst): Verify that SYMBOL is a known symbol.
 src/eval.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/eval.c b/src/eval.c
index 014905c..16c36fa 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -831,6 +831,7 @@ usage: (defconst SYMBOL INITVALUE [DOCSTRING])  */)
   Lisp_Object sym, tem;
   sym = XCAR (args);
+  CHECK_SYMBOL (sym);
   Lisp_Object docstring = Qnil;
   if (!NILP (XCDR (XCDR (args))))

reply via email to

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