Skip to content

Instantly share code, notes, and snippets.

@vanhoefm
Created January 20, 2013 20:43
Show Gist options
  • Save vanhoefm/4581593 to your computer and use it in GitHub Desktop.
Save vanhoefm/4581593 to your computer and use it in GitHub Desktop.
/*notvuln.c*/
int main(int argc, char **argv[]) {
char *buf;
buf = (char*)malloc(1024);
printf("buf=%p", buf);
strcpy(buf, argv[1]);
free(buf);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment