diff options
author | Eli Zaretskii <eliz@gnu.org> | 2016-02-15 16:03:54 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2016-02-15 16:03:54 +0200 |
commit | 44b16f60fd80afe574964390d896635971cb5504 (patch) | |
tree | 758f8f82608148b93e329bc1c2cdf4a65b3a75ef /src/eval.c | |
parent | 652e5b49d92d77fe057cf73bcb41f7170182bc8d (diff) | |
download | emacs-44b16f60fd80afe574964390d896635971cb5504.tar.gz |
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)
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |