1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Avoid errors in rmailsum for messages without "From"

* lisp/mail/rmailsum.el (rmail-header-summary): Be defensive about
the presence of the "From" header.  (Bug#49770)

Copyright-paperwork-exempt: yes
This commit is contained in:
Nick Gasson 2021-07-29 21:24:13 +08:00 committed by Eli Zaretskii
parent 314474e2d5
commit 7e8d1b08e3

View file

@ -758,7 +758,8 @@ the message being processed."
len mch lo newline)
;; If there are multiple lines in FROM,
;; discard up to the last newline in it.
(while (setq newline (string-match "\n" from))
(while (and (stringp from)
(setq newline (string-match "\n" from)))
(setq from (substring from (1+ newline))))
(if (or (null from)
(string-match