🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #19872

[BUGREPORT] inn-1.5.1sec: idbuff[SMBUF vs BIG_BUFFER]

#19872
From: Heiko Schlichting
Date: Wed, 30 Jul 1997 00:00
54 lines
2032 bytes
After installing inn-1.5.1sec instead inn-1.5.1  nnrpd dumps core whenever
a 'NEXT' or 'LAST' should answer with a Message-ID:

[heiko@Boa] 171 (~): telnet 0 119
200 cis.fu-berlin.de NNRP server INN 1.5.1sec 25-Jul-1997 ready (posting ok).
group bln.test
211 48 1 48 bln.test
stat 40
223 40 <5rjfiq$o4n$1@cis.fu-berlin.de> status
next
Connection closed by foreign host.


After tracing a little bit, I assume that the problem is the size of
idbuff in function CMDnextlast() of nnrpd/article.c:

	char       idbuff[SMBUF];

Later in CMDnextlast() function ARTopen is called with idbuff as second
argument:
	ARTopen(buff, idbuff)

Unfortunately ARTopen() expects the second argument of size BIG_BUFFER:

ARTopen(name, id)
    char                *name;
    char                *id;
{
[...]
    (void)strncpy(id, save_artid, BIG_BUFFER - 1);
    id[BIG_BUFFER - 1] = '\0';
[...]

In my configuration BIG_BUFFER is 8096 and SMBUF is 256, so nnrpd dumps
a core. Changing the size of idbuff to BIG_BUFFER corrects the problem
for me:

--- nnrpd/article.c.org	Wed Jul 30 03:29:03 1997
+++ nnrpd/article.c	Wed Jul 30 05:38:26 1997
@@ -551,7 +551,7 @@
     char	*av[];
 {
     char	buff[SPOOLNAMEBUFF];
-    char	idbuff[SMBUF];
+    char	idbuff[BIG_BUFFER];
     int		save;
     BOOL	next;
     int		delta;

Heiko Schlichting  | Freie Universitaet Berlin
heiko@FU-Berlin.DE | Center for Information Services (DFN-CIS)

Technical Details
Message-ID: <5rmdp1$m6r@fu-berlin.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <5rmdp1$m6r@fu-berlin.de>
Subject: [BUGREPORT] inn-1.5.1sec: idbuff[SMBUF vs BIG_BUFFER]
Date: Wed, 30 Jul 1997 00:00:00 +0000
From: heiko@cis.fu-berlin.de (Heiko Schlichting)
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 260412401
Organization: Freie Universitaet Berlin
X-Access: 16 17 19
Newsgroups: news.software.nntp
NNTP-Posting-User: heiko