Podcast
Questions and Answers
Which function can help prevent buffer overflow vulnerabilities?
Which function can help prevent buffer overflow vulnerabilities?
- strcspn() (correct)
- strcpy()
- strlen()
- strstr()
What is a commonly used function to concatenate two strings safely and prevent buffer overflow?
What is a commonly used function to concatenate two strings safely and prevent buffer overflow?
- strchr()
- strpbrk()
- strtok()
- strncat() (correct)
Which function is NOT suitable for copying strings to avoid buffer overflow?
Which function is NOT suitable for copying strings to avoid buffer overflow?
- strcat() (correct)
- strncpy()
- strcpy()
- memcpy()
What can happen if strcpy() is used without proper input checking?
What can happen if strcpy() is used without proper input checking?
Which function is primarily used for finding a substring in a string and may not prevent buffer overflow?
Which function is primarily used for finding a substring in a string and may not prevent buffer overflow?
Flashcards are hidden until you start studying