Avoid crashes in 'defconst'

* src/eval.c (Fdefconst): Verify that SYMBOL is a known symbol.
(Bug#41817)
This commit is contained in:
Stephen Berman 2020-06-11 23:10:07 +02:00 committed by Eli Zaretskii
parent 11e3413cff
commit 368e140660

View file

@ -831,6 +831,7 @@ usage: (defconst SYMBOL INITVALUE [DOCSTRING]) */)
Lisp_Object sym, tem; Lisp_Object sym, tem;
sym = XCAR (args); sym = XCAR (args);
CHECK_SYMBOL (sym);
Lisp_Object docstring = Qnil; Lisp_Object docstring = Qnil;
if (!NILP (XCDR (XCDR (args)))) if (!NILP (XCDR (XCDR (args))))
{ {