(mml-generate-mime-1,mml-compute-boundary-1): Update 'mml handles on recursive
authorAndreas Seltenreich <andreas+git@gate450.dyndns.org>
Sat, 1 May 2010 07:17:48 +0000 (09:17 +0200)
committerAndreas Seltenreich <andreas+git@gate450.dyndns.org>
Sat, 1 May 2010 07:17:48 +0000 (09:17 +0200)
mml-to-mime translation and check them for boundary delimiter collisions.
Reported by: Greg Troxel.

lisp/ChangeLog
lisp/mml.el

index b4b976c..15448c4 100644 (file)
@@ -1,3 +1,9 @@
+2010-05-01  Andreas Seltenreich  <seltenreich@gmx.de>
+
+       * mml.el (mml-generate-mime-1,mml-compute-boundary-1): Update 'mml
+       handles on recursive mml-to-mime translation and check them for
+       boundary delimiter collisions.  Reported by: Greg Troxel.
+
 2010-04-27  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * gnus-util.el: Don't load tm and apel XEmacs packages when compiling.
index f262dc6..9dc0966 100644 (file)
@@ -520,7 +520,10 @@ If MML is non-nil, return the buffer up till the correspondent mml tag."
                          ;; `m-g-d-t' will be bound to "message/rfc822"
                          ;; when encoding an article to be forwarded.
                          (mml-generate-default-type "text/plain"))
-                     (mml-to-mime))
+                     (mml-to-mime)
+                     ;; Update handle so mml-compute-boundary can
+                     ;; detect collisions with the nested parts.
+                     (setcdr (assoc 'contents cont) (buffer-string)))
                    (let ((mm-7bit-chars (concat mm-7bit-chars "\x1b")))
                      ;; ignore 0x1b, it is part of iso-2022-jp
                      (setq encoding (mm-body-7-or-8))))
@@ -699,7 +702,7 @@ If MML is non-nil, return the buffer up till the correspondent mml tag."
 (defun mml-compute-boundary-1 (cont)
   (let (filename)
     (cond
-     ((eq (car cont) 'part)
+     ((member (car cont) '(part mml))
       (with-temp-buffer
        (cond
         ((cdr (assq 'buffer cont))