Advertisement
Guest User

Untitled

a guest
Jan 3rd, 2013
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.34 KB | None | 0 0
  1. #include <string.h>
  2. #include <stdio.h>
  3.  
  4. void unreachable_code ()
  5. {
  6.     printf("This code is not executed");
  7. }
  8.  
  9. void vuln (char *arg)
  10. {
  11.     char buffer[50];
  12.  
  13.     strcpy(buffer, arg);
  14.  
  15.     printf("buffer = <%s>\n", buffer);
  16. }
  17.  
  18. int main (int argc, char **argv)
  19. {
  20.     if (argc > 1)
  21.         vuln(argv[1]);
  22.  
  23.     printf("Good Bye!");
  24.  
  25.     return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement