Question: For the next program, there is buffer overflow present. Your task is to fix the code so that buffer overflow can be avoided Here is

For the next program, there is buffer overflow present. Your task is to fix the code so that buffer overflow can be avoided Here is the link for the mentioned article: H. Shahriar et al., "Buffer Overflow Patching for Cand C++ Programs Rule-Based Approach," ACM SIGAPP Applied Computing Review, Vol. 13, Issue 2, June 2013, pp. 8-19 Kennesaw Digital Library void main ) char src[10]: printf ("enter name) gets (src); void main O char *src-"hello world"; 1) char dest[5]; memcpy (dest, src, 10); void main (f char src[10]; printf (enter name"); fgets (src, sizeof(src), stdin); void main O char *src-"hello world" char dest[5]; int n = sizeof (src); if (sizeof (dest)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
