mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-23 07:19:15 +00:00
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)
This commit is contained in:
parent
785682c26d
commit
63e59c8ca5
@ -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). */
|
||||
|
Loading…
Reference in New Issue
Block a user