During a security assessment, a penetration tester discovers that a web application fails to validate the size of user input, leading to a buffer overflow. Which application security control would have BEST prevented this vulnerability?
Input validation directly prevents malformed input from causing buffer overflows.
Why this answer
Input validation ensures that data conforms to expected formats and sizes, preventing malformed input from causing overflows.