SHARE
TWEET

c buffer overflow

a guest Jan 11th, 2017 102 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2.  
  3. int main(int argc, char * argv[]) {
  4.  
  5.     char buf[200];
  6.  
  7.     if(argc == 1) {
  8.  
  9.         printf("Usage: %s input\n", argv[0]);
  10.         exit(0);
  11.  
  12.     }
  13.  
  14.     strcpy(buf,argv[1]);
  15.     printf("%s", buf);
  16.  
  17. }
RAW Paste Data
Top