Skip to content

Commit e50c865

Browse files
committed
adapt house_of_botcake
1 parent e363bb9 commit e50c865

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

glibc_2.43/house_of_botcake.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ int main()
3131

3232
// prepare heap layout
3333
puts("Preparing heap layout");
34-
puts("Allocating 7 chunks(malloc(0x100)) for us to fill up tcache list later.");
35-
intptr_t *x[7];
34+
puts("Allocating 0x10 chunks(malloc(0x100)) for us to fill up tcache list later.");
35+
intptr_t *x[0x10];
3636
for(int i=0; i<sizeof(x)/sizeof(intptr_t*); i++){
3737
x[i] = malloc(0x100);
3838
}
@@ -46,7 +46,7 @@ int main()
4646
// cause chunk overlapping
4747
puts("Now we are able to cause chunk overlapping");
4848
puts("Step 1: fill up tcache list");
49-
for(int i=0; i<7; i++){
49+
for(int i=0; i<0x10; i++){
5050
free(x[i]);
5151
}
5252
puts("Step 2: free the victim chunk so it will be added to unsorted bin");

0 commit comments

Comments
 (0)