Fix crash in evaluating functions
See Bug#24673 * src/eval.c (funcall_lambda): Fix crash for bogus functions such as (closure).
This commit is contained in:
parent
d8374c4e95
commit
ceb46f0021
1 changed files with 4 additions and 2 deletions
|
@ -2825,9 +2825,11 @@ funcall_lambda (Lisp_Object fun, ptrdiff_t nargs,
|
||||||
{
|
{
|
||||||
if (EQ (XCAR (fun), Qclosure))
|
if (EQ (XCAR (fun), Qclosure))
|
||||||
{
|
{
|
||||||
fun = XCDR (fun); /* Drop `closure'. */
|
Lisp_Object cdr = XCDR (fun); /* Drop `closure'. */
|
||||||
|
if (! CONSP (cdr))
|
||||||
|
xsignal1 (Qinvalid_function, fun);
|
||||||
|
fun = cdr;
|
||||||
lexenv = XCAR (fun);
|
lexenv = XCAR (fun);
|
||||||
CHECK_LIST_CONS (fun, fun);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
lexenv = Qnil;
|
lexenv = Qnil;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue