*BSD News Article 33248


Return to BSD News archive

Xref: sserve comp.os.386bsd.questions:11795 comp.os.386bsd.development:2336 comp.os.386bsd.misc:2812
Path: sserve!newshost.anu.edu.au!munnari.oz.au!spool.mu.edu!agate!homer.CS.Berkeley.EDU!edward
From: edward@homer.CS.Berkeley.EDU (Edward Wang)
Newsgroups: comp.os.386bsd.questions,comp.os.386bsd.development,comp.os.386bsd.misc
Subject: Re: Why does FreeBSD 1.1.5 say gets() is unsafe?
Date: 26 Jul 1994 00:40:46 GMT
Organization: University of California, Berkeley
Lines: 8
Message-ID: <311m2e$o33@agate.berkeley.edu>
References: <30lrf3$2ii@acmez.gatech.edu> <ASAMI.94Jul21184711@forgery.cs.berkeley.edu> <31181v$ibk@agate.berkeley.edu> <ASAMI.94Jul25151654@forgery.cs.berkeley.edu>
NNTP-Posting-Host: homer.cs.berkeley.edu
Cc: 

In article <ASAMI.94Jul25151654@forgery.cs.berkeley.edu>,
Satoshi ASAMI <asami@cs.berkeley.edu> wrote:
>Hmm, so how can you write a program that uses gets() and is safe?

As long as it's not setuid or run from a daemon, it's perfectly safe,
just coredumps from time to time.

I think this is enough on gets().