🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
3 messages
3 total messages Started by Joerg Pichel Tue, 09 Dec 1997 00:00
inn 1.7.2 and expireover-defect.patch
#24181
Author: Joerg Pichel
Date: Tue, 09 Dec 1997 00:00
78 lines
2980 bytes
(btw: It seems there is no 1.7.1. It's only a symlink to 1.7.2 ?)

I downloaded inn 1.7.2 and now my question is whether the 
       expireover-defect.patch
patch in 
       ftp://ftp.isc.org/isc/inn/unoff-patches/

still is a good recommendation? I would say yes. But what's the boss'
opinion :-)) ?


patched version:

:> diff -c inn-1.7.2/expire/expireover.c inn-1.7/expire/expireover.c                            
*** inn-1.7.2/expire/expireover.c       Tue Dec  9 00:48:50 1997
--- inn-1.7/expire/expireover.c Mon Dec  1 14:43:14 1997
***************
*** 438,444 ****
           caller's use.  mibsoft 8/22/97
         */
        for (hp = Headers, i = ARTfieldsize; --i >= 0; hp++) {
!           if (hp->HasHeader) {
                DISPOSE(hp->Header);
                hp->Header = 0;
            }
--- 438,444 ----
           caller's use.  mibsoft 8/22/97
         */
        for (hp = Headers, i = ARTfieldsize; --i >= 0; hp++) {
!           if (hp->Length) { /* Was hp->Header. Fix due to pmb1@york.ac.uk 11/3/97 */
                DISPOSE(hp->Header);
                hp->Header = 0;
            }
***************
*** 481,486 ****
--- 481,491 ----
                for (p = colon; *++p && ISWHITE(*p); )
                    continue;
            size = strlen(p);
+           if (!size) { /* Ignore empty headers 11/5/97 due to pmb1@york.ac.uk */
+               i = -1; /* Abort */
+               lasthp = 0;
+               break;
+           }
              hp->Length = size;
              hp->Header = NEW(char, hp->Length + 1);
            (void)strcpy(hp->Header, p);


original version:

:> diff -c inn-1.7.2/expire/expireover.c inn-1.7/expire/expireover.c.orig 
*** inn-1.7.2/expire/expireover.c       Tue Dec  9 00:48:50 1997
--- inn-1.7/expire/expireover.c.orig    Tue Oct  7 17:17:57 1997
***************
*** 438,444 ****
           caller's use.  mibsoft 8/22/97
         */
        for (hp = Headers, i = ARTfieldsize; --i >= 0; hp++) {
!           if (hp->HasHeader) {
                DISPOSE(hp->Header);
                hp->Header = 0;
            }
--- 438,444 ----
           caller's use.  mibsoft 8/22/97
         */
        for (hp = Headers, i = ARTfieldsize; --i >= 0; hp++) {
!           if (hp->Header) {
                DISPOSE(hp->Header);
                hp->Header = 0;
            }

There are no other changes in the expire directory.

J"org.

Re: inn 1.7.2 and expireover-defect.patch
#24162
Author: Forrest J. Cavalier III
Date: Tue, 09 Dec 1997 00:00
52 lines
2418 bytes
In article <66jeul$f9g$1@bsdti6.sdm.de>, pichel@bsdti1.sdm.de wrote...
>
>(btw: It seems there is no 1.7.1. It's only a symlink to 1.7.2 ?)
>
>I downloaded inn 1.7.2 and now my question is whether the 
>       expireover-defect.patch
>patch in 
>       ftp://ftp.isc.org/isc/inn/unoff-patches/
>
>still is a good recommendation? I would say yes. But what's the boss'
>opinion :-)) ?

Short answer:
    If you are running 1.7.1 or 1.7.2, then do not apply the     
expireover-defect.patch.  

The long answer:

There are two equivalent fixes to two defects in expireover.c
    - The 1.7.1 version:  (the HasHeader version) was what was suggested by
    Mike Brudenell (pmb1@york) , the person who identified the defect.

    - The expireover-defect.patch fixes the same problem in a different
      manner.  

The differences are really a matter of software philosophy.

In other parts of INN, the length member is used to determine if a
buffer needs to be allocated or (free'd.)  Using HasHeader works
in this particular section of code, but that really was not the
original intent for HasHeader.

There was a lingering defect in the 1.5.1 code also, related to
the !size test later on.  (In 1.5.1 this could be a very unlikely
memory leak.)  The one line HasHeader fix avoids this bug too, but
in a non-obvious way.

The ISC preferred the 1 line fix reported by pmb1@york, even
though it doesn't quite match what the rest of the code in
INN does.  

The philosophy difference only matters when someone is trying
to understand and read the code at a later point in time.

Forrest Cavalier, Mib Software, INN customization and consulting 
Watch for updates to the Usenet RKT patches sections detailing
1.7.1 and 1.7.2 soon.  (Subscribers will receive notice and
a summary in email.)  http://www.mibsoftware.com/rktsub.htm


Re: inn 1.7.2 and expireover-defect.patch
#24182
Author: James Brister
Date: Tue, 09 Dec 1997 00:00
24 lines
1495 bytes
Joerg Pichel <pichel@bsdti1.sdm.de> writes:

> (btw: It seems there is no 1.7.1. It's only a symlink to 1.7.2 ?)
> 
> I downloaded inn 1.7.2 and now my question is whether the 
>        expireover-defect.patch
> patch in 
>        ftp://ftp.isc.org/isc/inn/unoff-patches/
> 
> still is a good recommendation? I would say yes. But what's the boss'
> opinion :-)) ?

I don't think it's necessary. The first chunk does the same as now, just
using a different variable to check a condition, and the second chunk
shouldn't ever be necessary as there should never be any empty headers (and
if they're getting through I'd like to fix that).

James
-- 
James Brister                                            brister@vix.com
Internet Software Consortium      http://www.isc.org     inn@isc.org 

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads