From: Lars Magne Ingebrigtsen Date: Tue, 11 Jan 2011 19:28:06 +0000 (+0100) Subject: (nnimap-convert-partial-article): Protect against zero-length body parts. X-Git-Url: https://cgit.sxemacs.org/?a=commitdiff_plain;h=9a6f050343be1e99fdacb2328edf6f89e788abbf;p=gnus (nnimap-convert-partial-article): Protect against zero-length body parts. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 668350a63..af97fb79c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2011-01-11 Lars Magne Ingebrigtsen + * nnimap.el (nnimap-convert-partial-article): Protect against + zero-length body parts. + * mm-decode.el (mm-preferred-alternative-precedence): Discourage showing empty parts. diff --git a/lisp/nnimap.el b/lisp/nnimap.el index 51fa532a3..0c711701e 100644 --- a/lisp/nnimap.el +++ b/lisp/nnimap.el @@ -582,7 +582,7 @@ textual parts.") ;; Collect all the body parts. (while (looking-at ".*BODY\\[\\([.0-9]+\\)\\]") (setq id (match-string 1) - bytes (nnimap-get-length)) + bytes (or (nnimap-get-length) 0)) (beginning-of-line) (delete-region (point) (progn (forward-line 1) (point))) (push (list id (buffer-substring (point) (+ (point) bytes)))