Safe coding practices (was Re: Bug in users command)

Tom Christiansen tchrist at convex.COM
Mon Feb 4 05:19:37 AEST 1991


>From the keyboard of chip at tct.uucp (Chip Salzenberg):
:According to schwartz at groucho.cs.psu.edu (Scott Schwartz):
:>Happily, Chris Torek's new 4.4BSD stdio provides a way to
:>read lines of any length using ``fgetline''.
:
:BSD isn't the world; fixing 4.4BSD won't help me.

It's not the world, but it's a start.  Do you have a scheme for fixing
everything everywhere simultaneously?  It's a hard problem.  (I often wish
RTM's Internet worm had gone around fixing broken code: the ultimate
update engine. :-)

:Each site (or programmer) needs to write fgetline() or its moral
:equivalent using getc(), malloc() and realloc(), and use it every time
:gets() or fgets() would have been used.

Ug.  If it's written once, published, and made available for use free
of charge *and* without viral strings attached, each site or programmer
won't have to re-invent the wheel.  Of course, sites without source are
still largely at the mercy of vendors.

--tom
--
Still waiting to read alt.fan.dan-bernstein using DBWM, Dan's own AI
window manager, which argues with you 10 weeks before resizing your window.
    Tom Christiansen	tchrist at convex.com	convex!tchrist



More information about the Comp.std.c mailing list