changeset 107081:ad4a4794a3d7

* mail/rmail.el (rmail-show-message-1): Handle malformed quoted-printable text. (Bug#5441)
author Glenn Morris <rgm@gnu.org>
date Wed, 03 Feb 2010 21:10:21 -0800
parents da4ec7ca387c
children e8f9df14b15b
files lisp/ChangeLog lisp/mail/rmail.el
diffstat 2 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Wed Feb 03 21:05:37 2010 -0800
+++ b/lisp/ChangeLog	Wed Feb 03 21:10:21 2010 -0800
@@ -1,5 +1,8 @@
 2010-02-04  Glenn Morris  <rgm@gnu.org>
 
+	* mail/rmail.el (rmail-show-message-1): Handle malformed
+	quoted-printable text.  (Bug#5441)
+
 	* mail/mail-utils.el (mail-unquote-printable-region): Doc fix.
 
 	* simple.el (visual-line-mode): Capitalize lighter.
--- a/lisp/mail/rmail.el	Wed Feb 03 21:05:37 2010 -0800
+++ b/lisp/mail/rmail.el	Wed Feb 03 21:10:21 2010 -0800
@@ -2727,8 +2727,10 @@
 	    (insert-buffer-substring mbox-buf body-start end)
 	    (cond
 	     ((string= character-coding "quoted-printable")
-	      (mail-unquote-printable-region (point-min) (point-max)
-                                             nil nil 'unibyte))
+	      ;; See bug#5441.
+	      (or (mail-unquote-printable-region (point-min) (point-max)
+						 nil t 'unibyte)
+		  (message "Malformed MIME quoted-printable message")))
 	     ((and (string= character-coding "base64") is-text-message)
 	      (base64-decode-region (point-min) (point-max)))
 	     ((eq character-coding 'uuencode)