From 61b8f9c4903734ae5a019b1f8e7706287aeb0f9d Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Wed, 13 Sep 2017 10:04:14 +0000 Subject: [PATCH] Protect against malformed MIME messages that cause inf-loop (bugfix) * lisp/gnus/gnus-art.el (gnus-article-mime-handles): Protect against malformed MIME messages that cause inf-loop. --- lisp/gnus/gnus-art.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 8fc5ebaa9bd..226a56e1870 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -6342,8 +6342,9 @@ Provided for backwards compatibility." ;; in each element are in the increasing order. (dolist (handle (reverse gnus-article-mime-handle-alist)) (if (stringp (cadr handle)) - (setq flat (nconc flat (gnus-article-mime-handles - (cddr handle) (list (car handle)) flat))) + (when (cddr handle) + (setq flat (nconc flat (gnus-article-mime-handles + (cddr handle) (list (car handle)) flat)))) (delq (rassq (cdr handle) flat) flat) (setq flat (nconc flat (list (cons (list (car handle)) (cdr handle))))))) -- 2.39.5