Commit 63e59c8c authored by Eli Zaretskii's avatar Eli Zaretskii

Avoid crashes in malformed defvar

* src/eval.c (Fdefvar): Don't call XSYMBOL on something that
might not be a symbol.  This avoids crashes due to malformed
'defvar' forms.  (Bug#32552)
parent 785682c2
......@@ -773,7 +773,7 @@ usage: (defvar SYMBOL &optional INITVALUE DOCSTRING) */)
LOADHIST_ATTACH (sym);
}
else if (!NILP (Vinternal_interpreter_environment)
&& !XSYMBOL (sym)->u.s.declared_special)
&& (SYMBOLP (sym) && !XSYMBOL (sym)->u.s.declared_special))
/* A simple (defvar foo) with lexical scoping does "nothing" except
declare that var to be dynamically scoped *locally* (i.e. within
the current file or let-block). */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment