Mail Archives: pgcc/1998/07/13/03:20:57
> >>"the 'gets' function is dangerous and should not be used."
> >
> >The gets() function does not check how long string the user
> >gives; if it is too long string and does not fit in sOut
> >array, you have a bug in your program (memory corruption).
>
> 120 bytes. Why would it give memory corruption, knowing it's just a pointer
> to an existing array of 120 bytes? I only give it an address where it needs
> to put the small string.
>
> What's wrong with this, and yes i don't want it to check how long the
> string is, it just must put the string at that address , that's it!
>
Well, if the program is a user daemon, you have a security flaw on your
hands for one =)
-David Waite
- Raw text -