From: Eli Zaretskii Date: Mon, 15 Feb 2016 14:03:54 +0000 (+0200) Subject: Avoid crashes in semi-malformed 'condition-case' X-Git-Tag: emacs-25.0.92~112 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=44b16f60fd80afe574964390d896635971cb5504;p=emacs.git Avoid crashes in semi-malformed 'condition-case' * src/eval.c (internal_lisp_condition_case): Treat a handler '(nil)' as if it were '(nil nil)'. (Bug#22675) --- diff --git a/src/eval.c b/src/eval.c index 6c912bc4762..26104a58277 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1245,7 +1245,7 @@ internal_lisp_condition_case (volatile Lisp_Object var, Lisp_Object bodyform, for (i = 0; i < clausenb; i++) { Lisp_Object clause = clauses[i]; - Lisp_Object condition = XCAR (clause); + Lisp_Object condition = CONSP (clause) ? XCAR (clause) : Qnil; if (!CONSP (condition)) condition = Fcons (condition, Qnil); struct handler *c = push_handler (condition, CONDITION_CASE);