The buffer overflow example was fixed as below. Is this safe?
int bof(char * )str, int size){
char *buffer = (char *) malloc(size);
strcpy(buffer, str);
return 1;
}
Expert Answer
An answer will be send to you shortly. . . . .
The buffer overflow example was fixed as below. Is this safe?
int bof(char * )str, int size){
char *buffer = (char *) malloc(size);
strcpy(buffer, str);
return 1;
}
An answer will be send to you shortly. . . . .