Call for INN 2.5.2 testing (new NNTP RFC 3977)

Russ Allbery rra at stanford.edu
Thu Nov 19 06:34:25 UTC 2009


Julien ÉLIE <julien at trigofacile.com> writes:

> Especially when I see that it is present on the server:

> 200 eternal-september.org InterNetNews server INN 2.5.2 (20091116 snapshot) ready (transit mode)
> HEAD <slrn20091109075439.943.twooffive at may.eternal-september.org>
> 221 0 <slrn20091109075439.943.twooffive at may.eternal-september.org> head
> Path: feeder.eternal-september.org!eternal-september.org!may.eternal-september.org!not-for-mail
> Newsgroups: 24hoursupport.helpdesk
> Subject: Re: Is the President of the USA a  Muslim ?
> Date: Mon, 09 Nov 2009 07:57:12 -0500
> Message-ID: <slrn20091109075439.943.twooffive at may.eternal-september.org>

> Very strange...
> I have just checked every call to bad_messageid logging and when it occurs,
> it is because the message-ID is found to be invalid and no posting is done.

I've seen things like this happen if there's some subtle boundary
condition that can cause the algorithm to read past the beginning or end
of the string by one character.  That one character is *usually* a nul,
and hence everything works, but sometimes it's not.  It's a typical
problem in C, where doing string handling properly is tricky.

If there's a test suite for the message ID checking, I'd throw that
message ID into the test suite and then run it under valgrind, which
usually turns up that sort of thing as a read of uninitialized memory or a
read past the bounds of an array.

I just fixed a subtle bug along those lines in another program of mine
where I was incorrectly doing:

        p = buffer + length - 1;
        while (isspace((int) *p))
            p--;
        p[1] = '\0';

which backs up beyond the beginning of the array if the line contained all
whitespace.

-- 
Russ Allbery (rra at stanford.edu)             <http://www.eyrie.org/~eagle/>

    Please send questions to the list rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.



More information about the inn-workers mailing list