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.
This commit is contained in:
Katsumi Yamaoka 2017-09-13 10:04:14 +00:00
parent a0202fdc85
commit 61b8f9c490

View file

@ -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)))))))