Article View: comp.sources.bugs
Article #2342bug in the 'ro' text formatter
From: Robert Lacoste
Date: Mon, 26 Feb 1990 12:50
Date: Mon, 26 Feb 1990 12:50
23 lines
932 bytes
932 bytes
I had a problem compiling the 'ro' text formatter submitted in
comp.source.unix with the sun C compiler :
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));
}
Any comment ? Robert Lacoste.
Technical Details
Message-ID:
<1126@laas.laas.fr>Path:
arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!inria!laas!kebra!rlacosteShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!inria!laas!kebra!rlacoste From: rlacoste@kebra.laas.fr (Robert Lacoste) Newsgroups: comp.sources.bugs Subject: bug in the 'ro' text formatter Message-ID: <1126@laas.laas.fr> Date: 26 Feb 90 12:50:41 GMT Sender: news@laas.laas.fr Reply-To: rlacoste@kebra.laas.fr (Robert Lacoste) Organization: LAAS-CNRS, Toulouse, France Lines: 23