GNU bug report logs -
#42029
`gnus-registry-spool-action' gets field beyond message headers
Previous Next
Reported by: tomotaka.suwa <at> gmail.com
Date: Wed, 24 Jun 2020 11:52:02 UTC
Severity: normal
Tags: fixed
Found in version 5.13
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
tomotaka.suwa <at> gmail.com writes:
> Hi,
>
> I've been suffering from `mail-source-crash-box' on getting new mail.
>
> After some debug and investigation, I noticed that
> `mail-extract-address-components' was failing by invalid addresses.
>
> The issue happened in `gnus-registry-spool-action' and invalid addresses
> are passed by calling `message-fetch-field' on the buffer not narrowed
> to message headers.
>
> Below snippet reproduce the root issue:
>
> (with-temp-buffer
> (save-excursion
> ;; mail header
> (insert "From: from <at> bar.com\n"
> "To: to <at> bar.com\n"
> "Subject: test\n")
> (newline)
> ;; mail body
> (insert "message\n"
> "Cc: >,@ <foo <at> bar.com>\n")) ;; by incorrect decode
> (gnus-registry-spool-action 1 "test"))
>
> In stead of `message-fetch-field', calling `message-field-value' would
> solve the problem since it ensures the buffer is narrowed at first.
Thanks for this report. It might be simpler to wrap the whole thing in a
single save-restriction+narrow-to-headers, since the function gets
called four times. What do you think?
This bug report was last modified 4 years and 308 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.