Im pretty bad at programming. Have an exam in a few hours and need to understand whats happening here.
Examine the code fragments below and report on three key items: a) the class/type of the vulnerability; b) the exact cause of the problem; and c) the code fix to be put in place to mitigate the vulnerability.
Code:int grab_request (char buf[], int buf_len) { int i; for (i=0; i< buf_len; i++) { /* put things into buf */ } buf[i] = ‘\0’; return i; }