Mail Archives: djgpp/1998/08/30/12:31:04
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.
- Raw text -