🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sources.bugs
Article #2360

Re: bug in the 'ro' text formatter

#2360
From: Keith Gabryelski
Date: Tue, 27 Feb 1990 22:53
37 lines
1183 bytes
In article <1126@laas.laas.fr> rlacoste@kebra.laas.fr (Robert Lacoste) writes:
>	Problem:
>		In ro_macr.c, line 170, a call to strlen is made
>		with an argument that can be NULL, giving a bus error
>		on a SUN 3...
>
>	Proposed correction:
>		Replacement of all strlen calls by mystrlen, with the
>		following definition:
>
>			int mystrlen(s)
>			char *s;
>			{
>			  if (s==NULL) return (0);
>			  else return(strlen(s));
>			}
>

Hmmmmm....

>	Any comment ?

Yeah, add this to main():

	{
		int fd = open("/dev/zero", 0);
		mmap(0, 2048, 0x01, 0x11, fd, 0);
		close(fd)
	}

Or fix the null pointer bugs.

Pax, Keith

Ps, :-(
-- 
ag@amix.commodore.com        Keith Gabryelski          ...!cbmvax!amix!ag
Technical Details
Message-ID: <295@amix.commodore.com>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcsun!sunic!uupsi!rpi!zaphod.mps.ohio-state.edu!mips!prls!pyramid!cbmvax!amix!ag
References: <1126@laas.laas.fr>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcsun!sunic!uupsi!rpi!zaphod.mps.ohio-state.edu!mips!prls!pyramid!cbmvax!amix!ag
From: ag@amix.commodore.com (Keith Gabryelski)
Newsgroups: comp.sources.bugs
Subject: Re: bug in the 'ro' text formatter
Message-ID: <295@amix.commodore.com>
Date: 27 Feb 90 22:53:47 GMT
References: <1126@laas.laas.fr>
Reply-To: ag@amix.commodore.com (Keith Gabryelski)
Organization: Commodore Amix Development
Lines: 37