Question: Fix the code below to make it so that it is not vulernable to stack buffer overflow void gctinp (ohar *inp, int siz) puts (Input
Fix the code below to make it so that it is not vulernable to stack buffer overflow

void gctinp (ohar *inp, int siz) puts ("Input value: ") fgets (inp, siz, stdin) printf("buffer3 getinp read %s ", inp); void display (char val) char tmp [16]; sprintf(tmp, "read val : puts (tmp); %s ", val); int main(int argc, char *argv []) char buf [16]; getinp (buf, sizeof (buf)) display (buf); printf ("buffer3 done In")
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
