🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nn
Article #2814

Re: Bug in letter selection.

#2814
From: Michael T Pins
Date: Tue, 09 Jun 1992 21:55
53 lines
2759 bytes
crystal@glia.biostr.washington.edu (crystal) writes:

>In <1992Jun5.181727.15786@javelin.sim.es.com> pashdown@javelin.sim.es.com (Pete Ashdown) writes:


>>A user here found this bug today.  If you are looking at a title selection
>>screen which doesn't have many articles, and you type the letter of an article
>>that is higher than what is on the screen, nn coredumps.  For example, if you
>>have one article "a" and you type any letter from b-z, it will coredump.

>Yes, it happens to me, too... if there are 6 articles and I want to look at
>all of them and forget to pay attention and hit a 7th letter then I get a 
>half-meg+ of core dump. I got puzzled when I found core dumps in 6 of my
>directories, and my administrator was irritable because I was over my storage
>quota.  We figured out that if you create a directory called 'core' in each
>one of the directories you are likely to call nn from, then the core dump has
>no place to go and voila! no more over quota angry sys admins... ;>

Of course, the better solution is to just fix the code....
The following patch will fix the problem, and is short enough it's worth
posting yet again:


  The following patch fixes the infamous 
  off by one bug in menu.c:
  
  *** menu.c.dist	Tue May  7 14:17:56 1991
  --- menu.c		Tue May  7 14:18:03 1991
  ***************
  *** 725,731 ****
	  article_id = map & ~K_ARTICLE_ID;
	  map = K_ARTICLE_ID;
  
  ! 	if (article_id < 0 || article_id > menu_articles) {
	      ding();
	      goto loop;
	  }
  --- 725,731 ----
	  article_id = map & ~K_ARTICLE_ID;
	  map = K_ARTICLE_ID;
  
  ! 	if (article_id < 0 || article_id >= menu_articles) {
	      ding();
	      goto loop;
	  }
  


-- 
*****************************************************************************
* Michael Pins                |   Internet: amigapd@isca.uiowa.edu          *
* ISCA's Amiga Librarian      |         #include <std.disclaimer>           *
*****************************************************************************
Technical Details
Message-ID: <mtpins.708126935@icaen.uiowa.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!sparky!uunet!wupost!spool.mu.edu!caen!zaphod.mps.ohio-state.edu!hobbes.physics.uiowa.edu!ns-mx!icaen.uiowa.edu!mtpins
References: <1992Jun5.181727.15786@javelin.sim.es.com> <crystal.707792300@glia>

Show Full Headers
Complete Article Headers
Message-ID: <mtpins.708126935@icaen.uiowa.edu>
Subject: Re: Bug in letter selection.
Date: Tue, 09 Jun 1992 21:55:35 +0000
From: mtpins@icaen.uiowa.edu (Michael T Pins)
References: <1992Jun5.181727.15786@javelin.sim.es.com> <crystal.707792300@glia>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!sparky!uunet!wupost!spool.mu.edu!caen!zaphod.mps.ohio-state.edu!hobbes.physics.uiowa.edu!ns-mx!icaen.uiowa.edu!mtpins
Newsgroups: news.software.nn
Article-I.D.: icaen.mtpins.708126935
Sender: news@ns-mx.uiowa.edu
Lines: 53