Possible bug in the feed mechanism - INN Current

Katsuhiro Kondou Katsuhiro_Kondou at isc.org
Sat Jul 20 08:36:30 UTC 2002


In article <828587608.20020715111155 at lacave.net>,
	"F. Senault" <fred at lacave.net> wrote;

} Maybe this problem has been addressed,

Not yet.

} The error message is generated in 'ARTparseheader' in art.c.  In
} v2.3.3, the numerical code was added in 'ARTpost', two steps higher in
} the call stack.  In v2.4.0, the mechanism has changed, and there's no
} such thing.  For a quick fix, I added the error code in
} 'ARTparseheader', but I guess it's not the best way to do it...

Exactly.  That bug was included in over one and half
year ago.  No one including me has reported for so
long.  Or only a few people run CURRENT?

} Hope this helps,

Thank you very much, and attached is what I just committed.
--
Katsuhiro Kondou

Index: innd/art.c
===================================================================
RCS file: /home/kondou/news/inn/repository/inn/innd/art.c,v
retrieving revision 1.185
diff -u -r1.185 art.c
--- innd/art.c	14 Apr 2002 13:46:31 -0000	1.185
+++ innd/art.c	20 Jul 2002 08:28:04 -0000
@@ -566,8 +566,8 @@
   if ((colon = memchr(header, ':', size)) == NULL || !ISWHITE(colon[1])) {
     if ((p = memchr(header, '\r', size)) != NULL)
       *p = '\0';
-    (void)sprintf(buff, "No colon-space in \"%s\" header",
-      MaxLength(header, header));
+    (void)sprintf(buff, "%d No colon-space in \"%s\" header",
+      NNTP_REJECTIT_VAL, MaxLength(header, header));
     if (p != NULL)
       *p = '\r';
     return;
@@ -591,8 +591,8 @@
       if (ISWHITE(*p)) {
 	c = *p;
 	*p = '\0';
-	(void)sprintf(buff, "Space before colon in \"%s\" header",
-	  MaxLength(header, header));
+	(void)sprintf(buff, "%d Space before colon in \"%s\" header",
+	  NNTP_REJECTIT_VAL, MaxLength(header, header));
 	*p = c;
 	return;
       }
@@ -616,8 +616,8 @@
       /* HDR_LEN() does not include trailing "\r\n" */
       hc->Length = header + size - 2 - p;
     } else {
-      (void)sprintf(buff, "Body of header is all blanks in \"%s\" header",
-      MaxLength(hp->Name, hp->Name));
+      (void)sprintf(buff, "%d Body of header is all blanks in \"%s\" header",
+      NNTP_REJECTIT_VAL, MaxLength(hp->Name, hp->Name));
     }
   }
   return;
@@ -989,7 +989,7 @@
 
   /* assumes Message-ID header is required header */
   if (!ARTidok(HDR(HDR__MESSAGE_ID))) {
-    strcpy(buff, "Bad \"Message-ID\" header");
+    (void)sprintf(buff, "%d Bad \"Message-ID\" header", NNTP_REJECTIT_VAL);
     TMRstop(TMR_ARTCLEAN);
     return FALSE;
   }
@@ -1037,7 +1037,8 @@
     NGsplit(HDR(HDR__NEWSGROUPS), HDR_LEN(HDR__NEWSGROUPS),
     &data->Newsgroups)) == 0) {
     TMRstop(TMR_ARTCLEAN);
-    strcpy(buff, "Unwanted character in \"Newsgroups\" header");
+    (void)sprintf(buff, "%d Unwanted character in \"Newsgroups\" header",
+      NNTP_REJECTIT_VAL);
     return FALSE;
   }
 


More information about the inn-bugs mailing list