Created
February 24, 2012 03:13
-
-
Save jodell/1896981 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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