> This doesn't check the bounds also, isn't it ?

It is:

> +       fgets (buffer, sizeof(buffer), stdin);

Note the "sizeof(buffer)" !

> And is gets not implemented as fgets (stdin) ?

Not really. gets() is similar, but cannot check for a buffer overrun
(because it has no SIZE argument), and always works on stdin.

Roman

Reply via email to