Path: utzoo!attcan!uunet!auspex!guy From: guy@auspex.UUCP (Guy Harris) Newsgroups: comp.lang.c Subject: Re: gets(3) nonsense Message-ID: <453@auspex.UUCP> Date: 15 Nov 88 17:27:22 GMT References: <867@cernvax.UUCP> <645@quintus.UUCP> <339@igor.Rational.COM> <14447@mimsy.UUCP> <1643@solo11.cs.vu.nl> <434@auspex.UUCP> <1657@solo11.cs.vu.nl> Reply-To: guy@auspex.UUCP (Guy Harris) Organization: Auspex Systems, Santa Clara Lines: 26 >\"Intended" in what sense? Somebody put it in there so that people would >\deliberately write programs using it, and thus would write programs that >\could be made to fail by sending them lines longer than they expect? > >Hey people! I just found out somebody put a nasty little program in /bin! >It's called `rm'. If you type `rm *', all your files will disappear! You've totally missed the point. Somebody might want all the files in a given directory to disappear. I have difficulty imagining anybody who *wants* to write a program that blows up when you feed too-long lines at it. >\Or somebody put it in there so that you could avoid the nasty run-time >\overhead of checking string bounds? > >Of course! "Of course somebody put it in so you can avoide string bounds checking?" I dispute this. Got any references handy to prove your assertion? >If you want security, use fgets()! I want security. I want everyone *else* to want security. I don't want programs that die randomly if they get handed lines that are too long. Programs like that are rude.