Skip to content

Instantly share code, notes, and snippets.

@nullren
Created February 26, 2012 20:37
Show Gist options
  • Save nullren/1918870 to your computer and use it in GitHub Desktop.
Save nullren/1918870 to your computer and use it in GitHub Desktop.
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