QuestionQ638

Web Application Injection Attacks

Which of the following C/C++ functions can cause a buffer overflow?

Each correct answer represents a complete solution.

Choose two
  • A printf()
  • B strcat()
  • C strcpy()
  • D strlength()
Explanation

strcat() and strcpy() do not take the destination buffer's capacity. strcat() can append more characters than the remaining space in its destination, and strcpy() can copy more characters than its destination holds; either operation can write beyond the buffer boundary.

Community Discussion

No comments yet. Be the first to start the discussion!