Page 1 of 1

The following lines of code are identified by the line number to the left. The code in this function has a buffer overfl

Posted: Fri Jul 08, 2022 6:45 am
by answerhappygod
The following lines of code are identified by the line number tothe left. The code in this function has a buffer overflowvulnerability. How can this code be corrected?
Increase the size of the character array inp on line2
Change the printf function on line 5 to only print 16 charactersfor tag and inp
Change the gets function on line 4 that takes one argument tothe fgets function that takes three arguments.
Increase the size of the character array tag on line1