From: Chong Yidong Date: Thu, 15 Jun 2006 18:34:26 +0000 (+0000) Subject: * mail/sendmail.el (mail-send): Search explicitly for X-Git-Tag: emacs-pretest-22.0.90~1956 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c43d75391af8665435c3db30eb61ca4630bd6a06;p=emacs.git * mail/sendmail.el (mail-send): Search explicitly for mail-header-separator when checking for corrupted header lines. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f58d5a00f1e..0f297921fb7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2006-06-15 Chong Yidong + + * mail/sendmail.el (mail-send): Search explicitly for + mail-header-separator when checking for corrupted header lines. + 2006-06-15 Nick Roberts * progmodes/gdb-ui.el (gdb-same-frame): New option. diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index ee512b3af31..28463208c45 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el @@ -863,11 +863,14 @@ the user from the mailer." (error "Message contains non-ASCII characters")))) ;; Complain about any invalid line. (goto-char (point-min)) - (while (< (point) (mail-header-end)) - (unless (looking-at "[ \t]\\|.*:\\|$") - (push-mark opoint) - (error "Invalid header line (maybe a continuation line lacks initial whitespace)")) - (forward-line 1)) + (re-search-forward (regexp-quote mail-header-separator) (point-max) t) + (let ((header-end (or (match-beginning 0) (point-max)))) + (goto-char (point-min)) + (while (< (point) header-end) + (unless (looking-at "[ \t]\\|.*:\\|$") + (push-mark opoint) + (error "Invalid header line (maybe a continuation line lacks initial whitespace)")) + (forward-line 1))) (goto-char opoint) (run-hooks 'mail-send-hook) (message "Sending...")