Article View: news.software.nntp
Article #81972Re: REVISED PATCH - was Re: A couple of suggestions for INN 2.5.1
From: Julien ÉLIE
Date: Fri, 09 Oct 2009 17:11
Date: Fri, 09 Oct 2009 17:11
44 lines
2724 bytes
2724 bytes
Hi D. Stussy,
> I found one side effect with my changes to the traditional overview: Some
> lowmarks are not being set properly. Apparently, the routine which
> generates the lowmark output in expireover doesn't initialize the actual
> variables it passes back if the opening of the overview file fails.
> Someone forgot to set a high=0, low=1 somewhere....
>
> In the very last section, added one line to initialize the lowmark variable
> to 0, so that a group that has no index file gets no entry into the
> "expireover -Z file" parameter. Without this line, the variable is never
> set and thus picks up garbage off the stack.
>
> @@ -919,6 +925,11 @@
> tdx_index_close(index);
> return false;
> }
> +
> + if (low != NULL) *low = 0;
> + if (!entry->indexinode) return true;
> + /* Since there was no inode for this group, there was nothing to do! */
> +
> tdx_index_rebuild_start(index, entry);
Yet, we have just before:
index = tdx_index_open(true);
if (index == NULL)
return false;
When the opening of the index file fails, "false" is returned; and expireover has:
if (!OVexpiregroup(line, &low, history))
warn("can't expire %s", line);
else if (lowmark != NULL && low != 0)
fprintf(lowmark, "%s %u\n", line, low);
Where in the code is used the uninitialized "low" when the index cannot be opened?
--
Julien ÉLIE
« Inter pradendum sit saepe parumque bibendum. »
Technical Details
Message-ID:
<hanqri$pm1$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!not-for-mailReferences:
<hag2i3$5id$4@snarked.org> <hald3h$9sl$1@snarked.org>Show Full Headers
Complete Article Headers
Message-ID: <hanqri$pm1$1@news.trigofacile.com> Subject: Re: REVISED PATCH - was Re: A couple of suggestions for INN 2.5.1 Date: Fri, 9 Oct 2009 19:11:14 +0200 From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> References: <hag2i3$5id$4@snarked.org> <hald3h$9sl$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!not-for-mail Newsgroups: news.software.nntp Organization: TrigoFACILE -- http://www.trigofacile.com/ Lines: 44 NNTP-Posting-Host: aaubervilliers-151-1-30-253.w83-112.abo.wanadoo.fr Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=original Content-Transfer-Encoding: 8bit X-Trace: news.trigofacile.com 1255108274 26305 83.112.21.253 (9 Oct 2009 X-Complaints-To: abuse@trigofacile.com NNTP-Posting-Date: Fri, 9 Oct 2009 17:11:14 +0000 (UTC) In-Reply-To: <hald3h$9sl$1@snarked.org> X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.6001.18000 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049