mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-29 07:58:28 +00:00
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
@ -2825,9 +2825,11 @@ funcall_lambda (Lisp_Object fun, ptrdiff_t nargs,
|
||||
{
|
||||
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);
|
||||
CHECK_LIST_CONS (fun, fun);
|
||||
}
|
||||
else
|
||||
lexenv = Qnil;
|
||||
|
Loading…
Reference in New Issue
Block a user