Path: utzoo!hoptoad!amdcad!amdahl!apple!brutus.cs.uiuc.edu!tut.cis.ohio-state.edu!mailrus!bbn!bbn.com!cosell From: cosell@bbn.com (Bernie Cosell) Newsgroups: alt.sources.d Subject: Re: Blank trimmer Message-ID: <45048@bbn.COM> Date: 31 Aug 89 12:53:49 GMT References: <14602@bfmny0.UUCP> <358@s1.Morgan.COM> Sender: news@bbn.COM Reply-To: cosell@BBN.COM (Bernie Cosell) Organization: Bolt Beranek and Newman Inc., Cambridge MA Lines: 24 In article <358@s1.Morgan.COM> jordan@Morgan.COM (Jordan Hayes) writes: }Tom Neff writes: } }>Xmain() }>X{ }>X char s[65536]; /* whatever */ }>X }>X while (gets(s) != NULL) } }No, this is one of those nasty hacks purists get on your case about }because you use gets() instead of fgets() ... Lest you mention 'purist' as if it was some kind of a dirty word, you should look at one of the reports on the internet virus. One of the ways it used to penetrate systems was to take advantage of a "gets" that should have been an 'fgets', and by sending a VERY long password overwrote the stack, and by putting the right magic stuff on the stack it arranged things so that it was given access as the now-bogus stack unwound. __ / ) Bernie Cosell /--< _ __ __ o _ BBN Sys & Tech, Cambridge, MA 02238 /___/_(<_/ (_/) )_(_(<_ cosell@bbn.com