🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sources.bugs
Article #69

Re: Bug in csh (history, "!a%100s"). Report and Fix. Apology.

#69
From: Michael Greim
Date: Mon, 10 Jul 1989 11:46
40 lines
2014 bytes
In article <114074@sun.Eng.Sun.COM>, argv%eureka@Sun.COM (Dan Heller) writes:
= In article <771@sbsvax.UUCP> greim@sbsvax.UUCP (Michael Greim) writes:
= > In article <113630@sun.Eng.Sun.COM>, argv%eureka@Sun.COM (Dan Heller) writes:
= > > Why are people so stuck on using printf?  Michael Greim finds a bug
= 
= Basically, I apologize for the "flame" that people seem to think I
= posted.  I wasn't flaming really.  I just meant to point out that
= puts() will never be slower than printf(), so to avoid "other bugs"
= (see below), it's safer to use puts when that's what you really meant.
= Sorry, Michael.

No offense taken.
As to "puts() will never be slower than printf()": I recall reading
somewhere that some people think about implementing puts() using printf().

= 
= No, I was talking about the type of bug that lint can't catch.  That is,
= I see this type of usage all the time:
= 
=     ...
=     send_to_file("this is a string");
=     ...
= 
= send_to_file(s)
= char *s;
= {
=     extern FILE *fp;
=     fprintf(fp, s);
= }
You must look at some strange progams :-)

I aggree that this is bad practice and people should be made aware of
it.

	-mg
-- 
Michael Greim    Email : greim@sbsvax.informatik.uni-saarland.dbp.de
                 or    : ...!uunet!unido!sbsvax!greim
[.signature removed by the board of censors for electronic mail's main
executive computer because it contained a four letter word ("word")]
Technical Details
Message-ID: <774@sbsvax.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!usc!cs.utexas.edu!uunet!mcvax!unido!sbsvax!greim
References: <113630@sun.Eng.Sun.COM> <771@sbsvax.UUCP> <114074@sun.Eng.Sun.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!usc!cs.utexas.edu!uunet!mcvax!unido!sbsvax!greim
From: greim@sbsvax.UUCP (Michael Greim)
Newsgroups: comp.sources.bugs
Subject: Re: Bug in csh (history, "!a%100s"). Report and Fix. Apology.
Summary: No offense taken.
Keywords: csh history format-string bug fix
Message-ID: <774@sbsvax.UUCP>
Date: 10 Jul 89 11:46:47 GMT
References: <113630@sun.Eng.Sun.COM> <771@sbsvax.UUCP> <114074@sun.Eng.Sun.COM>
Organization: Universitaet des Saarlandes, Saarbruecken, W-Germany
Lines: 40