CompTIA Security+ (SY0-501) — Question 529
A developer has incorporated routines into the source code for controlling the length of the input passed to the program. Which of the following types of vulnerabilities is the developer protecting the code against?
Answer options
- A. DLL injection
- B. Memory leak
- C. Buffer overflow
- D. Pointer dereference
Correct answer: C
Explanation
The correct answer is C, as controlling the length of input helps prevent buffer overflow vulnerabilities, which occur when data exceeds the storage capacity allocated for it. Options A, B, and D do not relate directly to input length management; DLL injection targets code execution, memory leaks involve resource management, and pointer dereference deals with accessing memory locations.