summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKatsumi Yamaoka <yamaoka@jpl.org>2017-09-13 10:04:14 +0000
committerKatsumi Yamaoka <yamaoka@jpl.org>2017-09-13 10:04:14 +0000
commit61b8f9c4903734ae5a019b1f8e7706287aeb0f9d (patch)
tree23e21ce6b34791ecdd8511b3f146f0f044645096 /lisp
parenta0202fdc85ddc36b73a1c7c4f2d3ec45cd22c5e1 (diff)
downloademacs-61b8f9c4903734ae5a019b1f8e7706287aeb0f9d.tar.gz
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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/gnus/gnus-art.el5
1 files 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)))))))