Skip to content

Instantly share code, notes, and snippets.

@spnow
Forked from vanhoefm/notvuln.c
Created December 24, 2013 12:24
Show Gist options
  • Select an option

  • Save spnow/8112593 to your computer and use it in GitHub Desktop.

Select an option

Save spnow/8112593 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