emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-25 ceb46f0: Fix crash in evaluating functions


From: Philipp Stephani
Subject: [Emacs-diffs] emacs-25 ceb46f0: Fix crash in evaluating functions
Date: Thu, 13 Oct 2016 11:12:22 +0000 (UTC)

branch: emacs-25
commit ceb46f002145e986c944b2423404535019b7e62b
Author: Philipp Stephani <address@hidden>
Commit: Philipp Stephani <address@hidden>

    Fix crash in evaluating functions
    
    See Bug#24673
    
    * src/eval.c (funcall_lambda): Fix crash for bogus functions such
    as (closure).
---
 src/eval.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/eval.c b/src/eval.c
index 13a41a2..b94712d 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -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;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]