From:	ADVAX::"mcnc!VM1.NoDak.EDU!sysnett%CC.NEWCASTLE.EDU.AU"  5-FEB-1991 06:58:23.56
To:	Multiple recipients of list ANU-NEWS <ANU-NEWS@NDSUVM1>
CC:	
Subj:	Fix for ACCVIO in NEWSUTILITY.C for ANU-NEWS V6.0-2

Received: by ADVAX.DECnet (utk-mail11 v1.5) ; Tue, 5 Feb 91 06:56:40 EST
Received:  from mcnc by ge-dab.GE.COM (5.61/GE-DAB 1.15) with UUCP
	id AA26956 for ; Tue, 5 Feb 91 06:43:34 -0500
Received: from VM1.NoDak.EDU by mcnc.mcnc.org (5.59/MCNC/6-11-90)
	id AA10633; Tue, 5 Feb 91 06:38:11 -0500
	for ARISIA.DNET.ge.com!EVERHART
Message-Id: <9102051138.AA10633@mcnc.mcnc.org>
Received: from NDSUVM1.BITNET by VM1.NoDak.EDU (IBM VM SMTP R1.2.1MX) with BSMTP id 2521; Tue, 05 Feb 91 05:37:05 CST
Received: from NDSUVM1.BITNET by NDSUVM1.BITNET (Mailer R2.07) with BSMTP id
 0051; Tue, 05 Feb 91 05:37:04 CST
Date:         Tue, 5 Feb 91 06:25:38 GMT
Reply-To: mcnc!VM1.NoDak.EDU!sysnett%CC.NEWCASTLE.EDU.AU
Sender: ANU-NEWS Discussion <ANU-NEWS@VM1.NoDak.EDU>
From: mcnc!VM1.NoDak.EDU!sysnett%CC.NEWCASTLE.EDU.AU
Subject:      Fix for ACCVIO in NEWSUTILITY.C for ANU-NEWS V6.0-2
To: Multiple recipients of list ANU-NEWS <ANU-NEWS@NDSUVM1>
 
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 here
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).
 
The output from the VMS DIFFERENCES command is
 
************
File D_11:[SYSNETT.NEWS]NEWSUTILITY.C;447
 2021                 sscanf(bufptr,"221 %d %s",&newsitm.itm_num,&subject);
 2022                 util_idcpy(newsitm.itm_id,subject);
******
File D_11:[SYSNETT.NEWS]NEWSUTILITY.C;446
 2021                 sscanf(bufptr,"221 %d %s",newsitm.itm_num,subject);
 2022                 util_idcpy(newsitm.itm_id,subject);
************
 
and the context diff's are -
 
*** newsutility.c;0
--- newsutility.c;-1
**************
*** 2018,2024
                newsitm.itm_flags = 0;
                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);
                while (cp1) {
                  if (cp2 = strchr(cp1,'\n')) *cp2++ = '\0';
--- 2018,2024 -----
                newsitm.itm_flags = 0;
                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);
                while (cp1) {
                  if (cp2 = strchr(cp1,'\n')) *cp2++ = '\0';
--
Tony Nicholson, Postmaster       | Internet: sysnett@cc.newcastle.EDU.AU
University Computing Services    | VAXPSI: psi%0505249626002::sysnett
University of Newcastle, NSW, 2308, AUSTRALIA
