🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #82724

Re: unrelated possible bug with C flag?

#82724
From: Julien ÉLIE
Date: Mon, 01 Feb 2010 07:17
53 lines
3873 bytes
Hi Dieter,

> I do NOT want to check syntax here because INN has
> ALREADY ACCEPTED the article, and as such, I assume that it is already
> syntactically correct.  Syntax checking should be performed BEFORE article
> acceptance.

A relaying agent is NOT REQUIRED to reject articles because of their
syntax.  It is only a MAY, and innd definitely does not reject an article
based on a wrong syntax of the Followup-To: header field.



>> In fact, the code you suggest is exactly the same as the one we
>> already had except for the fact that it adds the possibility of
>> a read beyond our allocated memory (look at your ++p if *p is '\0'
>> for an empty header field -- the variable might be set to an empty
>> string if the header exists and is empty).
>
> It's more correct than what you offered, as you compute the wrong value of
> "i" for at least one case.

Case that is easy to take into account:

- if (strncasecmp(p, "poster", 6) == 0
+ if (*p == '\0' || (strncasecmp(p, "poster", 6) == 0

with closing parenthesis afterwards.



> How can *p =0?  Only if we have "...," (a comma at the end of the string) -
> a syntax error, so it will never occur since we will not reach this point
> with a rejected article.

If you think that the Followup-To: header field can never end with a comma,
then please patch your INN with your suggested patch, and I will happily
inject in Usenet articles whose Followup-To: header fields end with commas.



> Why?  If the comma is found, we KNOW that the next character is NOT the end
> of the string (because, if it were, the article would have been rejected).

"we KNOW"?  :-)

-- 
Julien ÉLIE

« -- Nous parlerons quand l'interprète dormira.
  [Bong !]
  -- Il dort. On peut parler. » (Astérix)
Technical Details
Message-ID: <hk5v5k$37g$1@news.trigofacile.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!weretis.net!feeder2.news.weretis.net!news.trigofacile.com!.POSTED.aaubervilliers-151-1-9-10.w83-114.abo.wanadoo.fr!not-for-mail
References: <hic74m$vi8$1@news.trigofacile.com> <hicf9f$ntj$1@snarked.org> <hiclo9$dd4$1@news.trigofacile.com> <hidmvp$vh1$1@snarked.org> <hitipd$rtb$1@news.trigofacile.com> <hiu2ar$707$1@snarked.org> <hiun2p$2mt$1@news.trigofacile.com> <hj0m9c$g98$1@snarked.org> <hj7qh0$ggu$1@news.trigofacile.com> <hj8csn$cok$1@snarked.org> <hjaiid$f7c$1@news.trigofacile.com> <hjar9t$mq$1@snarked.org> <hjnpm4$f5l$1@news.trigofacile.com> <hjq8r4$s5h$1@news.trigofacile.com> <hjqp78$iis$1@snarked.org> <hjsinn$cst$1@news.trigofacile.com> <hjsvgf$vko$1@snarked.org> <hjt1a2$u54$1@news.trigofacile.com> <hjt36j$1m8$2@snarked.org> <hjt45t$167$1@news.trigofacile.com> <hk002q$lni$1@snarked.org> <hk23qr$dok$1@news.trigofacile.com> <hk3cgr$662$1@snarked.org> <hk3jns$rf1$1@news.trigofacile.com> <hk54ko$akg$1@snarked.org>

Show Full Headers
Complete Article Headers
Message-ID: <hk5v5k$37g$1@news.trigofacile.com>
Subject: Re: unrelated possible bug with C flag?
Date: Mon, 1 Feb 2010 08:17:10 +0100
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
References: <hic74m$vi8$1@news.trigofacile.com> <hicf9f$ntj$1@snarked.org> <hiclo9$dd4$1@news.trigofacile.com> <hidmvp$vh1$1@snarked.org> <hitipd$rtb$1@news.trigofacile.com> <hiu2ar$707$1@snarked.org> <hiun2p$2mt$1@news.trigofacile.com> <hj0m9c$g98$1@snarked.org> <hj7qh0$ggu$1@news.trigofacile.com> <hj8csn$cok$1@snarked.org> <hjaiid$f7c$1@news.trigofacile.com> <hjar9t$mq$1@snarked.org> <hjnpm4$f5l$1@news.trigofacile.com> <hjq8r4$s5h$1@news.trigofacile.com> <hjqp78$iis$1@snarked.org> <hjsinn$cst$1@news.trigofacile.com> <hjsvgf$vko$1@snarked.org> <hjt1a2$u54$1@news.trigofacile.com> <hjt36j$1m8$2@snarked.org> <hjt45t$167$1@news.trigofacile.com> <hk002q$lni$1@snarked.org> <hk23qr$dok$1@news.trigofacile.com> <hk3cgr$662$1@snarked.org> <hk3jns$rf1$1@news.trigofacile.com> <hk54ko$akg$1@snarked.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!weretis.net!feeder2.news.weretis.net!news.trigofacile.com!.POSTED.aaubervilliers-151-1-9-10.w83-114.abo.wanadoo.fr!not-for-mail
Newsgroups: news.software.nntp
Organization: TrigoFACILE -- http://www.trigofacile.com/
Lines: 53
Mime-Version: 1.0
Content-Type: text/plain; format=flowed; charset="Windows-1252";
 reply-type=original
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 1 Feb 2010 07:17:09 +0000 (UTC)
Injection-Info: news.trigofacile.com;
 posting-host="aaubervilliers-151-1-9-10.w83-114.abo.wanadoo.fr:83.114.8.10";
 logging-data="3312"; mail-complaints-to="abuse@trigofacile.com"
In-Reply-To: <hk54ko$akg$1@snarked.org>
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Windows Mail 6.0.6002.18005
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6002.18005