emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r110412: Fix infloop in rmailmm on mu


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r110412: Fix infloop in rmailmm on multipart messages with epilogues
Date: Sun, 07 Oct 2012 00:49:16 -0700
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 110412
fixes bug: http://debbugs.gnu.org/10101
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sun 2012-10-07 00:49:16 -0700
message:
  Fix infloop in rmailmm on multipart messages with epilogues
  
  * lisp/mail/rmailmm.el (rmail-mime-process-multipart):
  Do not confuse a multipart message with an epilogue
  with a "truncated" one; fixes 2011-06-27 change.
modified:
  lisp/ChangeLog
  lisp/mail/rmailmm.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-10-07 04:33:16 +0000
+++ b/lisp/ChangeLog    2012-10-07 07:49:16 +0000
@@ -1,3 +1,9 @@
+2012-10-07  Glenn Morris  <address@hidden>
+
+       * mail/rmailmm.el (rmail-mime-process-multipart):
+       Do not confuse a multipart message with an epilogue
+       with a "truncated" one; fixes 2011-06-27 change.  (Bug#10101)
+
 2012-10-07  Fabián Ezequiel Gallina  <address@hidden>
 
        Fix shell output retrieval and comint-prompt-regexp init.

=== modified file 'lisp/mail/rmailmm.el'
--- a/lisp/mail/rmailmm.el      2012-09-17 11:49:10 +0000
+++ b/lisp/mail/rmailmm.el      2012-10-07 07:49:16 +0000
@@ -832,7 +832,7 @@
   (let ((boundary (cdr (assq 'boundary content-type)))
        (subtype (cadr (split-string (car content-type) "/")))
        (index 0)
-       beg end next entities truncated)
+       beg end next entities truncated last)
     (unless boundary
       (rmail-mm-get-boundary-error-message
        "No boundary defined" content-type content-disposition
@@ -867,7 +867,13 @@
               ;; Handle the rest of the truncated message
               ;; (if it isn't empty) by pretending that the boundary
               ;; appears at the end of the message.
-              (and (save-excursion
+              ;; We use `last' to distinguish this from the more
+              ;; likely situation of there being an epilogue
+              ;; after the last boundary, which should be ignored.
+              ;; See rmailmm-test-multipart-handler for an example,
+              ;; and also bug#10101.
+              (and (not last)
+                   (save-excursion
                      (skip-chars-forward "\n")
                      (> (point-max) (point)))
                    (setq truncated t end (point-max))))
@@ -875,7 +881,8 @@
       ;; epilogue, else hide the boundary only.  Use a marker for
       ;; `next' because `rmail-mime-show' may change the buffer.
       (cond ((looking-at "--[ \t]*$")
-            (setq next (point-max-marker)))
+            (setq next (point-max-marker)
+                  last t))
            ((looking-at "[ \t]*\n")
             (setq next (copy-marker (match-end 0) t)))
            (truncated


reply via email to

[Prev in Thread] Current Thread [Next in Thread]