Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site sdcrdcf.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!harvard!talcott!panda!genrad!decvax!ittvax!dcdwest!sdcsvax!sdcrdcf!lwall From: lwall@sdcrdcf.UUCP (Larry Wall) Newsgroups: net.sources.bugs Subject: rn 4.3 patch #2 Message-ID: <1963@sdcrdcf.UUCP> Date: Mon, 13-May-85 20:32:51 EDT Article-I.D.: sdcrdcf.1963 Posted: Mon May 13 20:32:51 1985 Date-Received: Thu, 16-May-85 20:21:15 EDT Organization: System Development Corp. R+D, Santa Monica Lines: 98 System: rn version 4.3 Patch #: 2 Priority: LOW Subject: KILL file can set art < absfirst, causing "(-1 more)" error From: lwall@sdcrdcf.UUCP (Larry Wall) Description: If a newsgroup with a KILL file is left unread for a long time, the last article processed by the KILL file, as recorded by the THRU line in the KILL file, can become less than the minimum article in the newsgroup due to article expiration. Unfortunately, there was no check to see if this had happened, so it was possible for rn to try to junk articles without valid bits in the bitmap. This causes rn to think it has junked more articles than it really has, causing the count of unread articles to become incorrect. Fix: From rn, say "| patch -d DIR", where DIR is your rn source directory. Outside of rn, say "cd DIR; patch Patch #: 2 Index: kfile.c Prereq: 4.3 *** kfile.c.old Fri May 10 14:22:47 1985 --- kfile.c Fri May 10 14:22:49 1985 *************** *** 1,4 ! /* $Header: kfile.c,v 4.3 85/05/01 11:41:53 lwall Exp $ * * $Log: kfile.c,v $ * Revision 4.3 85/05/01 11:41:53 lwall --- 1,4 ----- ! /* $Header: kfile.c,v 4.3.1.2 85/05/10 14:21:29 lwall Exp $ * * $Log: kfile.c,v $ * Revision 4.3.1.2 85/05/10 14:21:29 lwall *************** *** 1,6 /* $Header: kfile.c,v 4.3 85/05/01 11:41:53 lwall Exp $ * * $Log: kfile.c,v $ * Revision 4.3 85/05/01 11:41:53 lwall * Baseline for release with 4.3bsd. * --- 1,12 ----- /* $Header: kfile.c,v 4.3.1.2 85/05/10 14:21:29 lwall Exp $ * * $Log: kfile.c,v $ + * Revision 4.3.1.2 85/05/10 14:21:29 lwall + * Prevented THRU from setting art < absfirst. + * + * Revision 4.3.1.1 85/05/10 11:34:33 lwall + * Branch for patches. + * * Revision 4.3 85/05/01 11:41:53 lwall * Baseline for release with 4.3bsd. * *************** *** 65,71 while (fgets(buf,LBUFLEN,kfp) != Nullch) { buf[strlen(buf)-1] = '\0'; if (strnEQ(buf,"THRU",4)) { ! firstart = atol(buf+4)+1; continue; } if (*buf == 'X') { /* exit command? */ --- 71,83 ----- while (fgets(buf,LBUFLEN,kfp) != Nullch) { buf[strlen(buf)-1] = '\0'; if (strnEQ(buf,"THRU",4)) { ! ART_NUM tmpart; ! ! tmpart = atol(buf+4)+1; ! if (tmpart < absfirst) ! tmpart = absfirst; ! check_first(tmpart); ! firstart = tmpart; continue; } if (*buf == 'X') { /* exit command? */