Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site cepu.UUCP Path: utzoo!linus!decvax!ittvax!dcdwest!sdcsvax!bmcg!cepu!scw From: scw@cepu.UUCP Newsgroups: net.news.b,net.bugs,net.news.sa Subject: A bug in unbnews.c (2.10.1) Message-ID: <358@cepu.UUCP> Date: Wed, 3-Oct-84 10:16:17 EDT Article-I.D.: cepu.358 Posted: Wed Oct 3 10:16:17 1984 Date-Received: Thu, 4-Oct-84 07:50:03 EDT Reply-To: scw@cepu.UUCP (Stephen C. Woods) Organization: VA Wadsworth Med. Center; LA CA Lines: 53 There is a problem with the distributed unbnews.c (in 2.10.1) This problem only affects machines where (sizeof int) != (sizeof long) The manifestation is that any LONG article (size > 32767) will cause unbnews to bomb out. I discovered this bug while working on a batched news spooler (the pipe to unbnews kept vanishing). *** unbnews.c.B Tue May 1 10:24:17 1984 --- unbnews.c Tue Oct 2 21:09:42 1984 *************** *** 42,45 char line[80]; long bytes = 0; if( fgets(line, sizeof(line), fp)==NULL ) --- 42,46 ----- char line[80]; long bytes = 0; + long atol(); if( fgets(line, sizeof(line), fp)==NULL ) *************** *** 47,51 if( line[0]=='#' && line[1]=='!' ) ! sscanf(line, "#! %s %d", command, &bytes); else bytes = atoi(line); --- 48,52 ----- if( line[0]=='#' && line[1]=='!' ) ! sscanf(line, "#! %s %D", command, &bytes); else bytes = atol(line); *************** *** 49,53 sscanf(line, "#! %s %d", command, &bytes); else ! bytes = atoi(line); return(bytes); --- 50,54 ----- sscanf(line, "#! %s %D", command, &bytes); else ! bytes = atol(line); return(bytes); -- Stephen C. Woods (VA Wadsworth Med Ctr./UCLA Dept. of Neurology) uucp: { {ihnp4, uiucdcs}!bradley, hao, trwrb, sdcrdcf}!cepu!scw ARPA: cepu!scw@ucla-cs location: N 34 3' 9.1" W 118 27' 4.3"