SHARE
TWEET

Untitled

a guest Jan 3rd, 2013 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top