Question: The lines in the following code are identified by the number to the left. This code has a buffer overflow vulnerability. Which lines of code
The lines in the following code are identified by the number to the left. This code has a buffer overflow vulnerability. Which lines of code can be changed to correct the vulnerability?
Line #
int mainint argc, char argv
int valid FALSE;
char str;
char str;
nexttagstr;
getsstr;
if strncmpstr str
valid TRUE;
printfbuffer: strs strs validd
str str valid;
Question options:
lines and
lines and
lines and
lines and
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
