2000-12-22 03:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
authorShengHuo ZHU <zsh@cs.rochester.edu>
Fri, 22 Dec 2000 08:27:14 +0000 (08:27 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Fri, 22 Dec 2000 08:27:14 +0000 (08:27 +0000)
* mm-decode.el (mm-dissect-multipart): Avoid errors owing to
malformatted messages.

lisp/ChangeLog
lisp/mm-decode.el

index 5fc1765..8ea8bdf 100644 (file)
@@ -1,3 +1,8 @@
+2000-12-22 03:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * mm-decode.el (mm-dissect-multipart): Avoid errors owing to
+       malformatted messages.
+
 2000-12-22 02:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * mm-util.el (mm-image-load-path): New function.
index 6322126..786a3be 100644 (file)
@@ -408,7 +408,7 @@ The original alist is not modified.  See also `destructive-alist-to-plist'."
                    (match-beginning 0)
                  (point-max)))))
     (setq boundary (concat (regexp-quote boundary) "[ \t]*$"))
-    (while (re-search-forward boundary end t)
+    (while (and (< (point) end) (re-search-forward boundary end t))
       (goto-char (match-beginning 0))
       (when start
        (save-excursion
@@ -417,7 +417,7 @@ The original alist is not modified.  See also `destructive-alist-to-plist'."
            (setq parts (nconc (list (mm-dissect-buffer t)) parts)))))
       (forward-line 2)
       (setq start (point)))
-    (when start
+    (when (and start (< start end))
       (save-excursion
        (save-restriction
          (narrow-to-region start end)