Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <malloc.h>
- int main(){
- char *a = (char*) malloc(10);
- char *b = (char*) malloc(10);
- char *c = (char*) malloc(10);
- printf("a is at memory %p \n",a);
- printf("b is at memory %p \n",b);
- printf("c is at memory %p \n",c);
- free(a);
- printf("Freeing a \n");
- free(c);
- printf("Freeing c \n");
- free(b);
- printf("Freeing b : To bypass fastbin top check \n");
- free(c);
- printf("Freeing c again \n");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement