Skip to content

Commit 7934aa1

Browse files
committed
fix: incorrect p3 chunk range printed in overlapping_chunks
1 parent f1d95d2 commit 7934aa1

File tree

10 files changed

+10
-10
lines changed

10 files changed

+10
-10
lines changed

glibc_2.27/overlapping_chunks.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ int main(int argc , char* argv[])
5858
p4 = malloc(evil_region_size);
5959

6060
printf("\np4 has been allocated at %p and ends at %p\n", (char *)p4, (char *)p4+evil_region_size);
61-
printf("p3 starts at %p and ends at %p\n", (char *)p3, (char *)p3+0x580-8);
61+
printf("p3 starts at %p and ends at %p\n", (char *)p3, (char *)p3+0x80-8);
6262
printf("p4 should overlap with p3, in this case p4 includes all p3.\n");
6363

6464
printf("\nNow everything copied inside chunk p4 can overwrites data on\nchunk p3,"

glibc_2.31/overlapping_chunks.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ int main(int argc , char* argv[])
5656
p4 = malloc(evil_region_size);
5757

5858
printf("\np4 has been allocated at %p and ends at %p\n", (char *)p4, (char *)p4+evil_region_size);
59-
printf("p3 starts at %p and ends at %p\n", (char *)p3, (char *)p3+0x580-8);
59+
printf("p3 starts at %p and ends at %p\n", (char *)p3, (char *)p3+0x80-8);
6060
printf("p4 should overlap with p3, in this case p4 includes all p3.\n");
6161

6262
printf("\nNow everything copied inside chunk p4 can overwrites data on\nchunk p3,"

glibc_2.32/overlapping_chunks.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ int main(int argc , char* argv[])
5656
p4 = malloc(evil_region_size);
5757

5858
printf("\np4 has been allocated at %p and ends at %p\n", (char *)p4, (char *)p4+evil_region_size);
59-
printf("p3 starts at %p and ends at %p\n", (char *)p3, (char *)p3+0x580-8);
59+
printf("p3 starts at %p and ends at %p\n", (char *)p3, (char *)p3+0x80-8);
6060
printf("p4 should overlap with p3, in this case p4 includes all p3.\n");
6161

6262
printf("\nNow everything copied inside chunk p4 can overwrites data on\nchunk p3,"

glibc_2.33/overlapping_chunks.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ int main(int argc , char* argv[])
5656
p4 = malloc(evil_region_size);
5757

5858
printf("\np4 has been allocated at %p and ends at %p\n", (char *)p4, (char *)p4+evil_region_size);
59-
printf("p3 starts at %p and ends at %p\n", (char *)p3, (char *)p3+0x580-8);
59+
printf("p3 starts at %p and ends at %p\n", (char *)p3, (char *)p3+0x80-8);
6060
printf("p4 should overlap with p3, in this case p4 includes all p3.\n");
6161

6262
printf("\nNow everything copied inside chunk p4 can overwrites data on\nchunk p3,"

glibc_2.34/overlapping_chunks.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ int main(int argc , char* argv[])
5656
p4 = malloc(evil_region_size);
5757

5858
printf("\np4 has been allocated at %p and ends at %p\n", (char *)p4, (char *)p4+evil_region_size);
59-
printf("p3 starts at %p and ends at %p\n", (char *)p3, (char *)p3+0x580-8);
59+
printf("p3 starts at %p and ends at %p\n", (char *)p3, (char *)p3+0x80-8);
6060
printf("p4 should overlap with p3, in this case p4 includes all p3.\n");
6161

6262
printf("\nNow everything copied inside chunk p4 can overwrites data on\nchunk p3,"

glibc_2.35/overlapping_chunks.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ int main(int argc , char* argv[])
5656
p4 = malloc(evil_region_size);
5757

5858
printf("\np4 has been allocated at %p and ends at %p\n", (char *)p4, (char *)p4+evil_region_size);
59-
printf("p3 starts at %p and ends at %p\n", (char *)p3, (char *)p3+0x580-8);
59+
printf("p3 starts at %p and ends at %p\n", (char *)p3, (char *)p3+0x80-8);
6060
printf("p4 should overlap with p3, in this case p4 includes all p3.\n");
6161

6262
printf("\nNow everything copied inside chunk p4 can overwrites data on\nchunk p3,"

glibc_2.36/overlapping_chunks.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ int main(int argc , char* argv[])
5656
p4 = malloc(evil_region_size);
5757

5858
printf("\np4 has been allocated at %p and ends at %p\n", (char *)p4, (char *)p4+evil_region_size);
59-
printf("p3 starts at %p and ends at %p\n", (char *)p3, (char *)p3+0x580-8);
59+
printf("p3 starts at %p and ends at %p\n", (char *)p3, (char *)p3+0x80-8);
6060
printf("p4 should overlap with p3, in this case p4 includes all p3.\n");
6161

6262
printf("\nNow everything copied inside chunk p4 can overwrites data on\nchunk p3,"

glibc_2.37/overlapping_chunks.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ int main(int argc , char* argv[])
5656
p4 = malloc(evil_region_size);
5757

5858
printf("\np4 has been allocated at %p and ends at %p\n", (char *)p4, (char *)p4+evil_region_size);
59-
printf("p3 starts at %p and ends at %p\n", (char *)p3, (char *)p3+0x580-8);
59+
printf("p3 starts at %p and ends at %p\n", (char *)p3, (char *)p3+0x80-8);
6060
printf("p4 should overlap with p3, in this case p4 includes all p3.\n");
6161

6262
printf("\nNow everything copied inside chunk p4 can overwrites data on\nchunk p3,"

glibc_2.38/overlapping_chunks.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ int main(int argc , char* argv[])
5656
p4 = malloc(evil_region_size);
5757

5858
printf("\np4 has been allocated at %p and ends at %p\n", (char *)p4, (char *)p4+evil_region_size);
59-
printf("p3 starts at %p and ends at %p\n", (char *)p3, (char *)p3+0x580-8);
59+
printf("p3 starts at %p and ends at %p\n", (char *)p3, (char *)p3+0x80-8);
6060
printf("p4 should overlap with p3, in this case p4 includes all p3.\n");
6161

6262
printf("\nNow everything copied inside chunk p4 can overwrites data on\nchunk p3,"

glibc_2.39/overlapping_chunks.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ int main(int argc , char* argv[])
5656
p4 = malloc(evil_region_size);
5757

5858
printf("\np4 has been allocated at %p and ends at %p\n", (char *)p4, (char *)p4+evil_region_size);
59-
printf("p3 starts at %p and ends at %p\n", (char *)p3, (char *)p3+0x580-8);
59+
printf("p3 starts at %p and ends at %p\n", (char *)p3, (char *)p3+0x80-8);
6060
printf("p4 should overlap with p3, in this case p4 includes all p3.\n");
6161

6262
printf("\nNow everything copied inside chunk p4 can overwrites data on\nchunk p3,"

0 commit comments

Comments
 (0)