Gnus development mailing list
 help / color / mirror / Atom feed
* Change to make gnus-nov-parse-line error free
@ 2002-09-26  4:09 tsuchiya
  2002-09-26  4:57 ` Simon Josefsson
  0 siblings, 1 reply; 9+ messages in thread
From: tsuchiya @ 2002-09-26  4:09 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 196 bytes --]

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.


[-- Attachment #2: Type: text/plain, Size: 945 bytes --]

--- 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
-	(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

[-- Attachment #3: Type: text/plain, Size: 23 bytes --]

-- 
TSUCHIYA Masatoshi

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2002-09-27 13:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-26  4:09 Change to make gnus-nov-parse-line error free tsuchiya
2002-09-26  4:57 ` Simon Josefsson
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

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).