From:	ADVAX::"mcnc!VM1.NoDak.EDU!glass%VIXVAX.MGI.COM" "William H. Glass"  6-FEB-1991 10:56:08.35
To:	Multiple recipients of list ANU-NEWS <ANU-NEWS@NDSUVM1>
CC:	
Subj:	Re: Fix for ACCVIO in NEWSUTILITY.C for ANU-NEWS V6.0

Received: by ADVAX.DECnet (utk-mail11 v1.5) ; Wed, 6 Feb 91 10:54:34 EST
Received:  from mcnc by ge-dab.GE.COM (5.65a+/GE-DAB 1.15) with UUCP
	id AA19546 for ; Wed, 6 Feb 91 10:12:32 -0500
Received: from VM1.NoDak.EDU by mcnc.mcnc.org (5.59/MCNC/6-11-90)
	id AA24405; Wed, 6 Feb 91 08:59:51 -0500
	for ARISIA.DNET.ge.com!EVERHART
Message-Id: <9102061359.AA24405@mcnc.mcnc.org>
Received: from NDSUVM1.BITNET by VM1.NoDak.EDU (IBM VM SMTP R1.2.1MX) with BSMTP id 6584; Wed, 06 Feb 91 07:58:58 CST
Received: from NDSUVM1.BITNET by NDSUVM1.BITNET (Mailer R2.07) with BSMTP id
 0872; Wed, 06 Feb 91 07:58:56 CST
Date:         Wed, 6 Feb 91 08:37:14 GMT
Reply-To: "William H. Glass" <mcnc!VM1.NoDak.EDU!glass%VIXVAX.MGI.COM>
Sender: ANU-NEWS Discussion <ANU-NEWS@VM1.NoDak.EDU>
From: "William H. Glass" <mcnc!VM1.NoDak.EDU!glass%VIXVAX.MGI.COM>
Subject:      Re: Fix for ACCVIO in NEWSUTILITY.C for ANU-NEWS V6.0
To: Multiple recipients of list ANU-NEWS <ANU-NEWS@NDSUVM1>
 
In article <7839.27aedc82@cc.newcastle.edu.au>, sysnett@cc.newcastle.edu.au writ
es:
> I've found the following bug in NEWSUTILITY.C for ANU-NEWS 6.0-2 that was
> causing NEWS to ACCVIO when running in client mode to a NNTP server.  NEWS her
e
> is compiled with VAXC V3.1-051 and using Multinet 2.2E on VMS 5.4.   This bug
> has only shown itself when NEWS connects to a NNTP server carrying >1000
> newsgroups (so who knows where sscanf put the item number and subject under
> other circumstances).
>
 
And I didn't think that anyone would trip over this bug.  Since there are a
couple of other bugs in the near vicinity, I'll pass on a copy of the mail
I sent to Geoff reporting this:
 
________________________________________________________________________________
 
Geoff,
 
   I discovered some problems in NEWSUTILITY.C.  Since the code involved
is only used when running as an NNTP client and the server doesn't
support the XHDR command, I assume that there's a good chance that no one
is going to trip over it.  I only discovered it because someone at one
of my feed sites is currently playing with his NNTP program, and he
broke the XHDR command.
 
   The changes go into map_items.
 
   Bill
 
________________________________________________________________________________
 
          for (indx = first; indx <= last; ++indx) {
            sprintf(err_oline,"HEAD %d",indx);
            if (nntp_call(nntp_node,nntp_proto,err_oline,&bufptr) == 221) {
              newsitm.itm_grp = gap->grp_num;
              strcpy(newsitm.itm_title,"--Title not retrieved--");
              newsitm.itm_recvdate = 0;
              newsitm.itm_lines = 0;
/*              util_cvrt(newsitm.itm_title,subject); */
/* delete the above line */
              newsitm.itm_cachedate = 0;
              newsitm.itm_life = 0;
              newsitm.itm_flags = NEWS_M_UNREAD;
/*                                ^^^^^^^^^^^^^ */
              newsitm.itm_cid = 0;
              if (cp1 = strchr(bufptr,'\n')) *cp1++ = '\0';
              sscanf(bufptr,"221 %d %s",&newsitm.itm_num,subject);
/*                                      ^ */
              util_idcpy(newsitm.itm_id,subject);
 
--
 
William H. Glass                        Internet: glass@mgi.com
Management Graphics, Inc.               Phone:    +1 (612) 854-1220
1401 E. 79th Street
Minneapolis, MN  55425
