aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/mail/rmail.el23
1 files changed, 20 insertions, 3 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 40ab9117264..057ae8f9804 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -928,9 +928,26 @@ argument causes us to read a file name and use that file as the inbox."
928 header-end t) 928 header-end t)
929 (let ((beg (point)) 929 (let ((beg (point))
930 (eol (progn (end-of-line) (point)))) 930 (eol (progn (end-of-line) (point))))
931 (read (buffer-substring beg eol))))))) 931 (string-to-int (buffer-substring beg eol)))))))
932 (and size (numberp size) (>= size 0) 932 (and size
933 (goto-char (+ header-end size)))) 933 (if (and (natnump size)
934 (<= (+ header-end size) (point-max))
935 ;; Make sure this would put us at a position
936 ;; that we could continue from.
937 (save-excursion
938 (goto-char (+ header-end size))
939 (skip-chars-forward "\n")
940 (or (eobp)
941 (and (looking-at "BABYL OPTIONS:")
942 (search-forward "\n\^_" nil t))
943 (and (looking-at "\^L")
944 (search-forward "\n\^_" nil t))
945 (let ((case-fold-search t))
946 (looking-at mmdf-delim1))
947 (looking-at "From "))))
948 (goto-char (+ header-end size))
949 (message "Ignoring invalid Content-Length field")
950 (sit-for 1 0 t))))
934 951
935 (if (re-search-forward 952 (if (re-search-forward
936 (concat "^[\^_]?\\(" 953 (concat "^[\^_]?\\("