Path: utzoo!attcan!uunet!ncrlnk!ncrcae!hubcap!gatech!rutgers!tut.cis.ohio-state.edu!osu-cis!dsacg1!dsacg3!vfm6066 From: vfm6066@dsacg3.UUCP (John A. Ebersold) Newsgroups: comp.lang.c Subject: Re: retiring gets(3) Message-ID: <1177@dsacg3.UUCP> Date: 9 Nov 88 16:48:19 GMT References: <1988Nov8.054845.23998@utstat.uucp> <1031@cps3xx.UUCP> Reply-To: vfm6066@dsacg3.UUCP (John A. Ebersold) Organization: Defense Logistics Agency Systems Automation Center, Columbus Lines: 12 In article <1031@cps3xx.UUCP> usenet@cps3xx.UUCP (Usenet file owner) writes: > >This may be a naive question, or perhaps I haven't followed the right >stories, but what is the problem with using gets versus fgets? > One can feed a VERY long string to gets(3), since gets will keep reading characters until receipt of a newline and does not check for overflow of the receiving buffer. The VERY long string would cause a program to malfunction is some way that is not clear to me. Maybe overwritting the stack?