*BSD News Article 90585


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!goanna.cs.rmit.edu.au!news.apana.org.au!cantor.edge.net.au!news.teragen.com.au!news.access.net.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!howland.erols.net!newsxfer.itd.umich.edu!uunet!in3.uu.net!206.63.63.70!nwnews.wa.com!brokaw.wa.com!not-for-mail
From: Ken Pizzini <ken@halcyon.com>
Newsgroups: comp.lang.c,comp.unix.bsd.freebsd.misc
Subject: Re: What does gets() unsafe question mean?
Date: 8 Mar 1997 08:31:40 GMT
Organization: _
Lines: 18
Message-ID: <5fr85c$e14$5@brokaw.wa.com>
References: <01bc2a8f$67037120$db083ccc@default> <331F980F.7767@ici.net> <33206DE9.14B5@ix.netcom.com>
NNTP-Posting-Host: coho.halcyon.com
Xref: euryale.cc.adfa.oz.au comp.lang.c:195618 comp.unix.bsd.freebsd.misc:36728

In article <33206DE9.14B5@ix.netcom.com>,
Richard Scranton  <scrantr@ix.netcom.com> wrote:
>Recent versions of gcc have included this "feature" in an attempt to
>educate the unwashed masses (us) that not considering the effects of
>a possible buffer overrun is a bad thing.  Back around v1.3mumble, the
>gcc guys thought that #pragma was a bad thing, and therefore supported
>in the their own "implementation defined" manner.  Upon encountering
>a #pragma anything it would immediately halt the compilation and try
>to run Hack or Rogue, and if those failed, start emacs with the Tower
>of Hanoi lisp macro running.  I suppose strong opinions are better
>than no opinions...

I agree that their reaction to #pragma was absurd, but IMHO
their solution to gets() [and getwd(), and perhaps others]
seems quite reasonable.  A simple warning message, which one
ignores at one's own peril.

		--Ken Pizzini