🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #84009

Re: Memory allocation error

#84009
From: Julien ÉLIE
Date: Wed, 27 Apr 2011 15:19
34 lines
2181 bytes
Hi Steve,

> Apr 27 09:40:20 news nnrpd[2881]: failed to strndup 18446744073709551615
> bytes at overdata.c line 388: Cannot allocate memory
> 
> I have lots of free memory, but not *that* much! :)

Very interesting.

This number is 2^64 - 1 so I bet that len is -1 in the following code:

overview_get_standard_header(const struct cvector *vector, unsigned int element)
{
    size_t len;

    p = vector->strings[element];
    len = vector->strings[element + 1] - vector->strings[element] - 1;

    field = xstrndup(p, len);


It would mean that we have an element of size 0 in the vector.

Did you recently add header fields in your overview?  (stuff in parameters
like extraoverviewadvertised in inn.conf)

Though it looks a bit strange to me because the error comes from the
code of standard headers (those that do not change!).

-- 
Julien ÉLIE

« La bigamie, c'est quand on a deux femmes ; et la monotonie, c'est
  quand on n'en a qu'une. » (Coluche)
Technical Details
Message-ID: <91qqf7FemjU1@mid.individual.net>
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!num2.nntp.dca.giganews.com!num1.nntp.dca.giganews.com!number.nntp.dca.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!news3.google.com!news4.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
References: <slrnirfrgn.tbn.steve@news.mixmin.net>

Show Full Headers
Complete Article Headers
Message-ID: <91qqf7FemjU1@mid.individual.net>
Subject: Re: Memory allocation error
Date: Wed, 27 Apr 2011 17:19:03 +0200
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
References: <slrnirfrgn.tbn.steve@news.mixmin.net>
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!num2.nntp.dca.giganews.com!num1.nntp.dca.giganews.com!number.nntp.dca.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!news3.google.com!news4.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
Newsgroups: news.software.nntp
Organization: TrigoFACILE -- http://www.trigofacile.com/
Lines: 34
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: individual.net WWHL0UuNSBEaF3oQO4jSrAZVXBJdgAGGQ9reBMCF2IR4MzIbI=
Cancel-Lock: sha1:wIVyciL0BSJBg0hpgkHBql74uNg=
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; fr;
In-Reply-To: <slrnirfrgn.tbn.steve@news.mixmin.net>