[Mew-dist 14498] Re: b69

Konuma Masaki masaki at example.com
2000年 10月 11日 (水) 15:37:37 JST


> 今日はもう店じまいなので、b69 をリリースしておきます。

mewls.c: exec_getfile() が変なのでぱっち。

sizeof(Buf_filenm) より長い行は fgets() で 2 回以上に分けて読んでいる
ので、たとえば、inc の出力の Subject 部分の適当な位置に数字があると誤
動作します。

-- 小沼雅樹

--- mewls.c.orig	Wed Oct 11 15:05:39 2000
+++ mewls.c	Wed Oct 11 15:26:22 2000
@@ -601,9 +601,12 @@
 {
 	FILE *fp;
 	char *p;
+	int c;
 
 	*foldername = Folders[0].folder;
 	while ((p = fgets(Buf_filenm, sizeof(Buf_filenm), stdin)) != NULL) {
+		if (strchr(Buf_filenm, '\n') == NULL)
+			while ((c = fgetc(stdin)) != '\n' && c != EOF) ;
 		while (*p == ' ' || *p == '\t') p++;
 		if (isdigit(*p) == 0) continue;
 		*filename = p;



Mew-dist メーリングリストの案内