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
1 changed files with 1 additions and 1 deletions
|
@ -773,7 +773,7 @@ usage: (defvar SYMBOL &optional INITVALUE DOCSTRING) */)
|
||||||
LOADHIST_ATTACH (sym);
|
LOADHIST_ATTACH (sym);
|
||||||
}
|
}
|
||||||
else if (!NILP (Vinternal_interpreter_environment)
|
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
|
/* A simple (defvar foo) with lexical scoping does "nothing" except
|
||||||
declare that var to be dynamically scoped *locally* (i.e. within
|
declare that var to be dynamically scoped *locally* (i.e. within
|
||||||
the current file or let-block). */
|
the current file or let-block). */
|
||||||
|
|
Loading…
Add table
Reference in a new issue