LJ Archive

Listing 3. Exploitable Program

void func(char *str)
{
 char buffer[5];
 strcpy(buffer,str);
}
void main()
{
 char string[16];
 printf("Please enter your input string\n");
 gets(string);
 func(string);
 printf("This is the next instruction\n");
}
LJ Archive