GNU bug report logs -
#49770
[PATCH] rmailsum: error when message contains no From header
Previous Next
Reported by: Nick Gasson <nick <at> nickg.me.uk>
Date: Thu, 29 Jul 2021 14:35:02 UTC
Severity: normal
Tags: patch
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 49770 in the body.
You can then email your comments to 49770 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#49770
; Package
emacs
.
(Thu, 29 Jul 2021 14:35:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Nick Gasson <nick <at> nickg.me.uk>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 29 Jul 2021 14:35:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
If you open a mbox file in rmail-mode containing a message without a
"From" header and press "h" to display the summary, the following
error occurs:
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
string-match("\n" nil)
rmail-header-summary()
rmail-create-summary(1 nil nil 101)
rmail-create-summary-line(1)
rmail-get-summary(1)
rmail-new-summary-1("All" (rmail-summary) nil nil)
rmail-new-summary("All" (rmail-summary) nil)
rmail-summary()
funcall-interactively(rmail-summary)
call-interactively(rmail-summary nil nil)
* lisp/mail/rmailsum.el (rmail-header-summary): Check if from header
is set before scanning it for newlines.
---
lisp/mail/rmailsum.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el
index 44cff21b0628..436bc78250cb 100644
--- a/lisp/mail/rmailsum.el
+++ b/lisp/mail/rmailsum.el
@@ -758,7 +758,7 @@ rmail-header-summary
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 from (setq newline (string-match "\n" from)))
(setq from (substring from (1+ newline))))
(if (or (null from)
(string-match
--
2.30.2
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Thu, 29 Jul 2021 15:43:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Nick Gasson <nick <at> nickg.me.uk>
:
bug acknowledged by developer.
(Thu, 29 Jul 2021 15:43:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 49770-done <at> debbugs.gnu.org (full text, mbox):
> From: Nick Gasson <nick <at> nickg.me.uk>
> Date: Thu, 29 Jul 2021 21:24:13 +0800
> Cc: Nick Gasson <nick <at> nickg.me.uk>
>
> If you open a mbox file in rmail-mode containing a message without a
> "From" header and press "h" to display the summary, the following
> error occurs:
>
> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
> string-match("\n" nil)
> rmail-header-summary()
> rmail-create-summary(1 nil nil 101)
> rmail-create-summary-line(1)
> rmail-get-summary(1)
> rmail-new-summary-1("All" (rmail-summary) nil nil)
> rmail-new-summary("All" (rmail-summary) nil)
> rmail-summary()
> funcall-interactively(rmail-summary)
> call-interactively(rmail-summary nil nil)
>
> * lisp/mail/rmailsum.el (rmail-header-summary): Check if from header
> is set before scanning it for newlines.
Thanks, installed (with a tiny change: I prefer an explicit 'stringp'
test where we must have a string).
This contribution was small enough for us to be able to receive it
without a copyright assignment, but if you'd like to be able to
contribute in the future without restrictions, I suggest to start your
copyright assignment paperwork rolling. If you'd like that, I will
send you the form to fill and the instructions to go with it.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 27 Aug 2021 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 243 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.