🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.b
Article #7060

Cnews & nntp 1.5.7

#7060
From: Pekka Kytolaakso
Date: Sun, 04 Mar 1990 13:14
54 lines
2139 bytes
I just installed Cnews & latest nntp and found a bug (or is it afeature?)
in nntp server's command XHDR:

# telnet venus.csc.fi nntp
Trying 128.214.46.21 ...
Connected to venus.csc.fi.
Escape character is '^]'.
200 venus NNTP server version 1.5.6 (27 August 89) ready at Sun Mar  4 15:16:58 1
990 (posting ok).
group junk
211 31 1 31 junk
xhdr message-id 30-31
221 message-id fields follow
1 <9003021508.AA29255@funet.fi>
2 <1990Mar2.143137.23843@santra.uucp>
3 <9003021529.AA29746@funet.fi>
 ... [lines deleted to mage message smaller]
29 <31947@bigtex.cactus.org>
30 <BRIAN.90Mar4030443@radio.astro.utoronto.ca>
31 <31954@bigtex.cactus.org>
31 <31954@bigtex.cactus.org>
1 <9003021508.AA29255@funet.fi>
.


As you can see there are two extra lines in the  bottom. 
An easy fix is to add checking for end of articles to
the for loop in server/xhdr.c:

*** xhdr.c.orig Sun Mar  4 15:02:42 1990
--- xhdr.c      Sun Mar  4 15:13:48 1990
***************
*** 112,118 ****

        printf("%d %s fields follow\r\n", OK_HEAD, argv[1]);

!       for (;; artptr++) {
                if ((artnum = art_array[artptr]) < low)
                        continue;
                if (artnum > high)
--- 112,118 ----

        printf("%d %s fields follow\r\n", OK_HEAD, argv[1]);

!       for (;artptr<num_arts; artptr++) {
                if ((artnum = art_array[artptr]) < low)
                        continue;
                if (artnum > high)

Pekka Kyt|laakso
---------------------------------------------------------------
netmgr@csc.fi            Center for Scientific Computing
NETMGR@FINFUN.BITNET     PL 40   SF-02101 Espoo FINLAND
Phone: +358 0 4571       Telefax: + 358 0 4572302
Technical Details
Message-ID: <22466.900304151426@finsun.csc.fi>
Path: arc1-ca.pugleaf.net!utzoo!utstat!helios.physics.utoronto.ca!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!sunic!tut!finsun!netmgr

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utstat!helios.physics.utoronto.ca!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!sunic!tut!finsun!netmgr
From: netmgr@finsun.csc.fi (Pekka Kytolaakso)
Newsgroups: news.software.b
Subject: Cnews & nntp 1.5.7
Keywords: nntp, bug
Message-ID: <22466.900304151426@finsun.csc.fi>
Date: 4 Mar 90 13:14:26 GMT
Distribution: news
Organization: Centre for Scientific Computing
Lines: 54