Skip to content

Instantly share code, notes, and snippets.

@zwned
Created February 27, 2012 17:36
Show Gist options
  • Save zwned/1925783 to your computer and use it in GitHub Desktop.
Save zwned/1925783 to your computer and use it in GitHub Desktop.
ctf.stri.pe level04
#include <stdio .h>
#include <string .h>
#include <stdlib .h>
void fun(char *str)
{
char buf[1024];
strcpy(buf, str);
}
int main(int argc, char **argv)
{
if (argc != 2) {
printf("Usage: ./level04 STRING");
exit(-1);
}
fun(argv[1]);
printf("Oh no! That didn't work!\n");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment