Skip to content

Opening book details…

Can I read Understanding the Risks of gets() in C on EtoBox?

Understanding the Risks of gets() in C by Bharatiyulam is a document available to read on EtoBox.

What is Understanding the Risks of gets() in C about?

gets() is an insecure function for reading input in C as it does not check the size of the input buffer passed to it. This can lead to buffer overflows where data is written past the end of the allocated memory. fgets() is recommended instead as it takes the buffer size as a parameter, preventing buffer overflows from large user inputs. The document provides an example demonstrating how a buffer overflow from gets() can corrupt unrelated data in a program.

Author
Bharatiyulam
Language
EN