Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 Apollo 10/31/84; site apollo.uucp Path: utzoo!watmath!clyde!bonnie!akgua!mcnc!decvax!wivax!apollo!rees From: rees@apollo.uucp (Jim Rees) Newsgroups: net.news.b Subject: Re: 2.10.2 bug fix -- not enough space for followups Message-ID: <236a5241.1de6@apollo.uucp> Date: Fri, 7-Dec-84 13:10:25 EST Article-I.D.: apollo.236a5241.1de6 Posted: Fri Dec 7 13:10:25 1984 Date-Received: Sun, 9-Dec-84 06:24:55 EST References: <1282@hao.UUCP> Organization: Apollo Computer, Chelmsford, Mass. Lines: 62 readr.c: *************** *** 626,632 ! char folbuf[BUFLEN]; --- 630,636 ----- ! char folbuf[2*BUFLEN]; I don't like the idea of just growing this line forever. For one thing, there are other buffers elsewhere (in header.c, for example) that will still be too small. The approach I took was to impose an upper limit on the length of the references line. My limit is about 80, which is within the limit of 100 that news 2.10.1 will allow, but you can make it whatever you want. Here is my patch to readr.c: *************** *** 609,615 { register char *pathptr; int edit = 1; ! char *ed; FILE *tfp; char *replyname(); char subj[BUFLEN]; --- 613,619 ----- { register char *pathptr; int edit = 1; ! char *ed, *fbp; FILE *tfp; char *replyname(); char subj[BUFLEN]; *************** *** 658,665 folbuf[0] = '\0'; /* References */ if (hptr->followid[0]) { ! strcpy(folbuf, hptr->followid); ! strcat(folbuf, ", "); } strcat(folbuf, hptr->ident); --- 662,676 ----- folbuf[0] = '\0'; /* References */ if (hptr->followid[0]) { ! fbp = hptr->followid; ! ! /* If the references line is too long, truncate it. */ ! while (fbp && strlen(fbp) > 80) ! fbp = index(fbp + 1, '<'); ! if (fbp != NULL) { ! strcpy(folbuf, fbp); ! strcat(folbuf, " "); ! } } strcat(folbuf, hptr->ident);