Guest User

Untitled

a guest
Jun 24th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. void * ptr = kmalloc(110000);
  2. void *to_free;
  3. heap_t *buger
  4.  
  5. ptr += 100000;
  6.  
  7. buger = (heap_t *) ptr;
  8. heap_t->magic = HEAP_MAGIC;
  9. heap_t->size = 42;
  10. ptr += sizeof(heap_t);
  11. to_free = ptr;
  12. ptr += 42;
  13. bugger = (heap_t *) ptr;
  14. heap_t->magic = HEAP_MAGIC;
  15. heap_t->header = to_free - sizeof(heap_t);
  16.  
  17. free(to_free)
Add Comment
Please, Sign In to add comment