phantasia

Jeff Glass jjg at security.UUCP
Mon Jul 22 23:54:33 AEST 1985


In article <456 at busch.UUCP> mte at 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 at mitre-bedford.ARPA				(MIL)
 {allegra,ihnp4,utzoo,philabs,uw-beaver}!linus!security!jjg	(UUCP)



More information about the Comp.sources.bugs mailing list