🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #32632

Re: CNFS Size Mismatches

#32632
From: Mark Hittinger
Date: Fri, 30 Oct 1998 00:00
45 lines
2132 bytes
cbakinli@my-dejanews.com writes:
>Is there a limit to the size of a cycbuff?

Yes, you should not use a cycbuff that is larger than 2^31-1 (2gb).

If you are using 2.1-beta, there was a bug in the cnfs code that caused
a problem when INN got to the end of a cycbuff.  If there was less than
local artsize space in the cycbuff the computation overflowed and we tried
to write beyond the 2gb limit - *bewm*.  There was also a bug in the 
conversion of the cycbuff config file size field to a 32 bit int.

If you look in cnfs.c you can see if your source has the error.

Bad calculation, overflows to negative number:

    /* Article too big? */
    if (cycbuff->free + article.len > cycbuff->len - CNFS_BLOCKSIZE - 1) {

Moved things around to avoid overflow:

    /* Article too big? */
    if (article.len > cycbuff->len - cycbuff->free - CNFS_BLOCKSIZE - 1) {

If your cnfs.c has the first "if" then you want to make sure your cycbuffs
are no larger than (2^31-1 - 2*maxlocalartsize).  If your cnfs.c has the
second "if" instead then the bug is fixed in your source and you can make
cycbuffs that go all the way up to the 32 bit lseek wall (2^31-1).

I think.

Even though the bug is fixed in my source I still don't use cycbuffs that
go all the way :-)

I believe there are still a few 32bit/64bit problems in the source that
keep nnrpd from being able to read out of 64bit lseek cycbuffs.

Just use a bunch of 2gb cycbuffs for now.

Regards,

Mark Hittinger
ICGNetcom/DallasOps
bugs@freebsd.netcom.com

Technical Details
Message-ID: <71drqp$pri@dfw-ixnews7.ix.netcom.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.mbox.zip!not-for-mail
References: <71dokj$c5t$1@nnrp1.dejanews.com>

Show Full Headers
Complete Article Headers
Message-ID: <71drqp$pri@dfw-ixnews7.ix.netcom.com>
Subject: Re: CNFS Size Mismatches
Date: Fri, 30 Oct 1998 00:00:00 +0000
From: bugs@freebsd.netcom.com (Mark Hittinger)
References: <71dokj$c5t$1@nnrp1.dejanews.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.mbox.zip!not-for-mail
X-Deja-AN: 406879396
Organization: ICGNetcom
X-NETCOM-Date: Fri Oct 30 8:14:50 PM CST 1998
Newsgroups: news.software.nntp