From: Simon Josefsson <jas@extundo.com>
Cc: ding@gnus.org
Subject: Re: Change to make gnus-nov-parse-line error free
Date: Thu, 26 Sep 2002 06:57:51 +0200 [thread overview]
Message-ID: <iluofalcpps.fsf@latte.josefsson.org> (raw)
In-Reply-To: <87hegds874.fsf@pine.kuee.kyoto-u.ac.jp> (tsuchiya@namazu.org's message of "Thu, 26 Sep 2002 13:09:35 +0900")
tsuchiya@namazu.org writes:
> Hi, Gnus developers.
>
> I propose the following change to make gnus-nov-parse-line() error
> free. This change will protect Gnus against corrupted messages and
> illegal charsets of group parameters.
>
> --- gnus-sum.el 2002/09/21 04:33:42 6.228
> +++ gnus-sum.el 2002/09/26 04:36:54
> @@ -3838,7 +3838,7 @@
>
> ;; overview: [num subject from date id refs chars lines misc]
> (unwind-protect
It seems that entire code is already wrapped in a unwind-protect to
make Gnus cope with corrupt messages. Doesn't it work?
> - (progn
> + (let (x)
> (narrow-to-region (point) eol)
> (unless (eobp)
> (forward-char))
> @@ -3846,10 +3846,14 @@
> (setq header
> (make-full-mail-header
> number ; number
> - (funcall gnus-decode-encoded-word-function
> - (nnheader-nov-field)) ; subject
> - (funcall gnus-decode-encoded-word-function
> - (nnheader-nov-field)) ; from
> + (condition-case () ; subject
> + (funcall gnus-decode-encoded-word-function
> + (setq x (nnheader-nov-field)))
> + (error x))
> + (condition-case () ; from
> + (funcall gnus-decode-encoded-word-function
> + (setq x (nnheader-nov-field)))
> + (error x))
> (nnheader-nov-field) ; date
> (nnheader-nov-read-message-id) ; id
> (setq references (nnheader-nov-field)) ; refs
> --
> TSUCHIYA Masatoshi
next prev parent reply other threads:[~2002-09-26 4:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-26 4:09 tsuchiya
2002-09-26 4:57 ` Simon Josefsson [this message]
2002-09-26 5:12 ` tsuchiya
2002-09-26 5:34 ` Katsumi Yamaoka
2002-09-26 16:29 ` Simon Josefsson
2002-09-26 16:45 ` Jesper Harder
2002-09-27 3:23 ` Katsumi Yamaoka
2002-09-27 5:47 ` Clemens Fischer
2002-09-27 13:35 ` Jesper Harder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=iluofalcpps.fsf@latte.josefsson.org \
--to=jas@extundo.com \
--cc=ding@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).