By default, there is no limit on the length of the string being read. The scanf
family of functions will continue to read characters
into the buffer until they encounter a whitespace character.
If the input contains a string that is long enough and lacks whitespace characters, it can result in memory beyond the end of the buffer being
overwritten. This situation is known as a buffer overflow vulnerability.
What is the potential impact?
An attacker could exploit this vulnerability to overwrite memory used by the application. This could result in the modification of application
data, unexpected behavior, or even cause the application to become unstable or crash. In some cases, the attacker might also gain control over the
execution flow of the application, leading to arbitrary code execution.