]> git.eshelyaron.com Git - emacs.git/commitdiff
Avoid errors in rmailsum for messages without "From"
authorNick Gasson <nick@nickg.me.uk>
Thu, 29 Jul 2021 13:24:13 +0000 (21:24 +0800)
committerEli Zaretskii <eliz@gnu.org>
Thu, 29 Jul 2021 15:37:21 +0000 (18:37 +0300)
* lisp/mail/rmailsum.el (rmail-header-summary): Be defensive about
the presence of the "From" header.  (Bug#49770)

Copyright-paperwork-exempt: yes

lisp/mail/rmailsum.el

index 44cff21b062882168d86e2c6af57eaded206c589..ac933b9706d043c5f19eb7771756d2ac1e6ed0db 100644 (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