#include #include void our_strcpy(char *dest, char *source){ while(*dest++ = *source++); } int main(){ char *rabbit = "rabbit"; char *dest = malloc(9); char *otherspot = malloc(1024); printf("dest: %lx, otherspot: %lx\n", dest, otherspot); our_strcpy(dest, rabbit); our_strcpy(dest + 0x50, rabbit); printf("dest = %s\n", dest); printf("otherspot = %s\n", otherspot); return 0; } void vuln(){ char *rabbit = "The rabbit went be\x10\x52\x55\x55\x55\x55\x01\x01\xe1\x51\x55\x55\x55\x55";//d the computer and ate all the cords"; char dest[10]; our_strcpy(dest, rabbit); printf("dest = %s\n", dest); }