CompTIA Security+ (SY0-501) — Question 830

Buffer overflow can be avoided using proper:

Answer options

Correct answer: C

Explanation

The correct answer is C, as input validation helps ensure that only properly formatted data is processed, which can prevent buffer overflow vulnerabilities. The other options do not specifically address the root cause of buffer overflows; memory leak prevention and memory reuse are more related to resource management, while ASLR is a technique for randomizing memory addresses but does not directly prevent overflows.