*BSD News Article 33351


Return to BSD News archive

Xref: sserve comp.os.386bsd.questions:11846 comp.os.386bsd.development:2347 comp.os.386bsd.misc:2862
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!bunyip.cc.uq.oz.au!munnari.oz.au!constellation!osuunx.ucc.okstate.edu!newsfeed.ksu.ksu.edu!moe.ksu.ksu.edu!news.mid.net!crcnis1.unl.edu!wupost!spool.mu.edu!howland.reston.ans.net!europa.eng.gtefsd.com!MathWorks.Com!solaris.cc.vt.edu!csugrad.cs.vt.edu!not-for-mail
From: jaitken@csugrad.cs.vt.edu (Jeff Aitken)
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 1994 18:23:40 -0400
Organization: Virginia Tech Computer Science Dept, Blacksburg, VA
Lines: 13
Message-ID: <311e1c$96b@csugrad.cs.vt.edu>
References: <30lrf3$2ii@acmez.gatech.edu> <30mcrm$67t@darkstar.UCSC.EDU> <ASAMI.94Jul25151654@forgery.cs.berkeley.edu>
Reply-To: jaitken@vt.edu
NNTP-Posting-Host: csugrad.cs.vt.edu
X-Newsreader: TIN [version 1.2 PL2]

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().

Jeff

-- 
Jeff Aitken						 jaitken@vt.edu

   A witty saying proves nothing, but saying something stupid gets
                          peoples' attention