*BSD News Article 18557


Return to BSD News archive

Newsgroups: comp.os.386bsd.questions
Path: sserve!newshost.anu.edu.au!munnari.oz.au!spool.mu.edu!uwm.edu!cs.utexas.edu!uunet!Germany.EU.net!mcsun!sun4nl!fwi.uva.nl!gene.fwi.uva.nl!bosman
From: bosman@fwi.uva.nl (Cor Bosman)
Subject: Re: nn
Message-ID: <1993Jul17.203914.25267@fwi.uva.nl>
Sender: news@fwi.uva.nl
Nntp-Posting-Host: gene.fwi.uva.nl
Organization: FWI, University of Amsterdam
References: <226q88INN56k@xs4all.hacktic.nl> <227e9e$2hj@pdq.coe.montana.edu>
Date: Sat, 17 Jul 1993 20:39:14 GMT
Lines: 38

root@bsd.coe.montana.edu (Superuser) writes:

>In article <226q88INN56k@xs4all.hacktic.nl> cor@hacktic.nl (Cor) writes:

>[ 
> NN writes to the screen "warning: this program uses gets(), which is unsafe."
>]

>>Do we really need this message in gets.c?

>gets() does not check to make sure that you can put all of the line into
>the buffer you send it.

>It's better to use fgets(), which allows you to tell it how big the buffer
>is.

>So, change nn to use fgets and your problems will go away.

Well, somehow it still doesnt feel right. I *know* gets() is unsafe.
I dont know why nn uses it so much, but the fact is..they do.
And im sure nn isnt the only one. Do I have to change a zillion gets()
throughout the whole nn package cause the coder of the gets() function
in the 386bsd library decided to let us all know its unsafe?
I think we should leave people at least a choice instead of forcing them
like this. nn chokes on it. Its not some minor little thing.
Every time you post something using nntp it mails you an error because
of the library. I dont think its right to say 'its nn's fault for using gets()'
That'll show the programmers of nn. Boy..were they stupid, and real cool
that all 386bsd users are adviced to 'change nn if you want to use it without
error'
Oh well,not like any 386bsd user wants to use nn or anything.
(yeah yeah, it only fails if you use nntp posting)
cor
-- 
|bosman@fwi.uva.nl_   //     | Honest Officer , had I known my health      |
|-----------------\\ //AMIGA | stood in jeopardy I would never had lit one.|
|  PE no.1         \\/       |             -MAXIM (of the Hells Angels)-   |
|__________ Quickly Scotty,beam me up.There is no ox..y..ge..._____________|