#include <stdio.h>
int myprint(char* argv1) {
printf("%s", argv1);
}
void foo(char* argv1, char* argv2) {
int (*fptr)(char*) = myprint;
char buf[12];
strcpy(buf, argv1);
fptr(argv2); }
int main(int argc, char **argv) {
if (argc < 3)
{
printf("error\n");
return;
}
foo(argv[1], argv[2]); }
This is the c code I want to overflow. I already disable the aslr. What do I do next?