Strange INN-current crash.

Petr Novopashenniy pety at rusnet.ru
Thu Apr 2 07:47:21 UTC 2009



On Wed, 1 Apr 2009, Julien LIE wrote:

JL> Hi Petr,
JL> 
JL> I would suggest:
JL> 
JL> Index: art.c
JL> ===================================================================
JL> --- art.c       (rvision 8389)
JL> +++ art.c       (copie de travail)
JL> @@ -2108,6 +2108,7 @@
JL>         snprintf(cp->Error, sizeof(cp->Error),
JL>                   "%d Unwanted distribution \"%s\"",
JL>                   ihave ? NNTP_FAIL_IHAVE_REJECT :
JL> NNTP_FAIL_TAKETHIS_REJECT,
JL> +                 data->Distribution.List == NULL ? "" :
JL>                   MaxLength(data->Distribution.List[0],
JL>                             data->Distribution.List[0]));
JL>         ARTlog(data, ART_REJECT, cp->Error);
JL> 
JL> 
JL> 
JL> But I see that MaxLength() can segfault elsewhere in the code.
JL> So I also suggest:
JL> 
JL> 
JL> Index: util.c
JL> ===================================================================
JL> --- util.c      (rvision 8385)
JL> +++ util.c      (copie de travail)
JL> @@ -54,6 +54,11 @@
JL>      static char buff[80];
JL>      unsigned int i;
JL> 
JL> +    if (p == NULL || q == NULL) {
JL> +        *buff = '\0';
JL> +        return buff;
JL> +    }
JL> +
JL>      /* Already short enough? */
JL>      i = strlen(p);
JL>      if (i < sizeof buff - 1) {
JL> 
JL> 
JL> 
JL> 
JL> It now works fine:
JL> 
JL> Apr  1 21:15:03.889 - localhost <a1 at 19ldsfdodjfz> 439 Unwanted distribution
JL> ""
JL> 
JL> 
JL> Could you please also try it?

I try it on our test box:

This is the session:
takethis <a2 at 33>
Path: pety
Date: Wed, 01 Apr 2009 02:12:01 -0500
Subject: 010518
From: <pety at pety>
Distribution:
Message-ID: <a2 at 33>
Newsgroups: relcom.test


Test
.
439 <a2 at 33>
check <a2 at 33>
238 <a2 at 33>
takethis <a2 at 33>
Path: pety
Date: Wed, 01 Apr 2009 02:12:01 -0500
Subject: 010518
From: <pety at pety>
Message-ID: <a2 at 33>
Distribution:   
Newsgroups: relcom.test


Test
.
439 <a2 at 33>
check <a2 at 33>
438 <a2 at 33>
takethis <a2 at 34>
Path: pety
Date: Wed, 01 Apr 2009 02:12:01 -0500
Subject: 010518
From: <pety at pety>
Distribution:   
Message-ID: <a2 at 34>
Newsgroups: relcom.test


Test
.
439 <a2 at 34>
takethis <a2 at 35>
Path: pety
Date: Wed, 01 Apr 2009 02:12:01 -0500
Subject: 010518
From: <pety at pety>
Distribution:
Message-ID: <a2 at 35>
Newsgroups: relcom.test


Test
.
439 <a2 at 35>
check <a2 at 35>
238 <a2 at 35>

4 articles:
1. "Distribution: " - no log and history update (empty header)
2. "Distribution:    "
3. "Distribution:    "
4. "Distribution: " - no log and history update (empty header)

And this is log:

<news>npc5:~$ innd -d -f
Thu Apr  2 11:22:36 2009: starting
Apr  2 11:26:08.770 - npc5.stu.neva.ru <a2 at 33> 439 Unwanted distribution 
""
Apr  2 11:27:12.152 - npc5.stu.neva.ru <a2 at 34> 439 Unwanted distribution 
""

And, about the order of headers (after or before Message-ID):

Session:
200 npc5.stu.neva.ru InterNetNews server INN 2.5.0 (20090330 snapshot) 
ready
takethis <a2 at 41>
Path: pety
Date: Wed, 01 Apr 2009 02:12:01 -0500
Subject: 010518
From: <pety at pety>
Message-ID: <a2 at 41>
Cc:
Newsgroups: relcom.test


Test
.
439 <a2 at 41>
check <a2 at 41>
238 <a2 at 41>
takethis <a2 at 42>
Path: pety
Date: Wed, 01 Apr 2009 02:12:01 -0500
Subject: 010518
From: <pety at pety>
Cc:
Message-ID: <a2 at 42>
Newsgroups: relcom.test


Test
.
439 <a2 at 42>
check <a2 at 42>
238 <a2 at 42>

both articles with "Cc:" header (no spaces)

And this log:

<news>npc5:~$ innd -d -f
Thu Apr  2 11:41:22 2009: starting
Apr  2 11:41:26.268 - npc5.stu.neva.ru <a2 at 41> 439 No colon-space in "Cc:" 
header

No log for <a2 at 42>, and no history entries for both.

JL> Julien LIE
JL> 

--pety



More information about the inn-workers mailing list