Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/3/84; site security.UUCP Path: utzoo!linus!security!jjg From: jjg@security.UUCP (Jeff Glass) Newsgroups: net.sources.bugs Subject: Re: phantasia Message-ID: <931@security.UUCP> Date: Mon, 22-Jul-85 09:54:33 EDT Article-I.D.: security.931 Posted: Mon Jul 22 09:54:33 1985 Date-Received: Tue, 23-Jul-85 05:33:39 EDT References: <456@busch.UUCP> Reply-To: jjg@security.UUCP (Jeff Glass) Organization: MITRE Corp., Bedford, Ma. Lines: 29 Keywords: SIGBUS Summary: In article <456@busch.UUCP> mte@busch.UUCP (Moshe Eliovson) writes: > > Ever so often when I execute phantasia I get the > error for ill_sig(): > > Error: caught signal # 10. > > This is SIGBUS. I have no real idea why we're getting this > bus error. It traces to an fclose in titlestuff(). > Phantasia is overflowing an array. It is reading the contents of the "lastdead" file (in the phantasia lib directory) into the array "aline[80]", then formats it into the array "instr[80]". if you read too many characters from "lastdead", you overflow "instr", and then you get the bus error. anyway, to get phantasia going again, edit the lastdead file and make it shorter. the longterm fix is to change fgets(aline,80,fp); to fgets(aline,80-strlen("The last character to die is "), fp); or something like that. /jeff -- security!jjg@mitre-bedford.ARPA (MIL) {allegra,ihnp4,utzoo,philabs,uw-beaver}!linus!security!jjg (UUCP)