*BSD News Article 90529


Return to BSD News archive

#! rnews 1373 bsd
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!lucy.swin.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!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!news.sprintlink.net!news-peer.sprintlink.net!news-pull.sprintlink.net!news-dc-10.sprintlink.net!news.sprintlink.net!news-pen-4.sprintlink.net!nntp.snet.net!news.snet.net!usenet

From: "Jeffrey M. Metcalf" <metcalf@snet.net>
Newsgroups: comp.lang.c,comp.unix.bsd.freebsd.misc
Subject: What does gets() unsafe question mean?
Date: 7 Mar 1997 00:34:46 GMT
Organization: "SNET dial access service"
Lines: 22
Message-ID: <01bc2a8f$67037120$db083ccc@default>
NNTP-Posting-Host: hrfr03-sh4-port219.snet.net
X-Newsreader: Microsoft Internet News 4.70.1155
Xref: euryale.cc.adfa.oz.au comp.lang.c:195511 comp.unix.bsd.freebsd.misc:36687

Hello,

I recently wrote a little C program which uses the stdio.h function gets().
 I 
compiled and ran it under FreeBSD and I get..

warning: this program uses gets(), which is unsafe.

What exactly does this mean?  Why is it unsafe?  If possible, can any
replies
be sent as an e-mail to the above address?

Thank You,

JM
-- 
-----
Jeffrey M. Metcalf
metcalf@snet.net

http://ruddles.stat.uconn.edu/~jeff