Advertisement
bkit4s0

[stack1.c]

Jun 14th, 2015
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.21 KB | None | 0 0
  1. #include <stdio.h>
  2. int main(int argc, char const *argv[])
  3. {
  4.     int cookie;
  5.     char buf[16];
  6.     printf("&buf:_%p,_&cookie:_%p\n", buf, &cookie);
  7.     gets(buf);
  8.     if (cookie == 0x41424344)
  9.     {
  10.         printf("You_win!\n");
  11.     }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement