Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- #include <stdlib.h>
- int main(void)
- {
- char buf2[16] = "overwriteme";
- char buf1[16];
- strcpy(buf1, "");
- printf("buf1 val: %s\n", buf1);
- printf("buf2 val: %s\n", buf2);
- printf("buf1 addr: %p\n", (void *)buf1);
- printf("buf2 addr: %p\n", (void *)buf2);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement