*BSD News Article 33182


Return to BSD News archive

Xref: sserve comp.os.386bsd.questions:11759 comp.os.386bsd.development:2328 comp.os.386bsd.misc:2792
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!agate!asami
From: asami@cs.berkeley.edu (Satoshi ASAMI)
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?
Followup-To: comp.os.386bsd.questions,comp.os.386bsd.development,comp.os.386bsd.misc
Date: 25 Jul 94 15:49:29
Organization: CS Div. - EECS, University of California, Berkeley, CA 94720
Lines: 16
Message-ID: <ASAMI.94Jul25154929@forgery.cs.berkeley.edu>
References: <30lrf3$2ii@acmez.gatech.edu> <30mcrm$67t@darkstar.UCSC.EDU>
	<ASAMI.94Jul25151654@forgery.cs.berkeley.edu>
	<311e1c$96b@csugrad.cs.vt.edu>
NNTP-Posting-Host: forgery.cs.berkeley.edu
In-reply-to: jaitken@csugrad.cs.vt.edu's message of 25 Jul 1994 18:23:40 -0400

In article <311e1c$96b@csugrad.cs.vt.edu>
        jaitken@csugrad.cs.vt.edu (Jeff Aitken) writes:

 * Satoshi ASAMI (asami@cs.berkeley.edu) wrote:
 * 
 * : Hmm, so how can you write a program that uses gets() and is safe?
 * 
 * Use fgets() instead of gets().

You are following up the wrong post.  I'm the one who said gets() is
inherently unsafe, then someone said it's only that sendmail was badly
written.  I know that we should use fgets() instead of gets(), and so
do most other people (and it's already mentioned earlier in this
thread, I believe).

Satoshi