Date: Sun, 30 Aug 1998 19:30:28 +0300 (IDT) From: Eli Zaretskii To: Adam Brown cc: djgpp AT delorie DOT com Subject: Re: In-Reply-To: <35E976E1.3B00@geocities.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Sun, 30 Aug 1998, Adam Brown wrote: > > fgets() is a good deal safer than gets(). Because fgets allows you to limit the amount of characters read. gets, on the other hand, will joyfully read past the end of the buffer you supply and trash the stack. (Actually, a well-known case of a Trojan horse program was based on this.) > > sscanf() does a hell of a better job than sprintf() at handling input. > > In what way? sprintf is for output, not for input.