firmianay / CTF-All-In-One

CTF竞赛权威指南
https://firmianay.gitbook.io/ctf-all-in-one/
Creative Commons Attribution Share Alike 4.0 International
4.13k stars 704 forks source link

分类专题pwnlinux堆利用(二)的overlapping_chunks有个错误? #50

Open Nyakahashi opened 1 year ago

Nyakahashi commented 1 year ago

overlapping_chunks示例代码中的 fprintf(stderr, "p4: %p ~ %p\n", p4, p4+evil_region_size); fprintf(stderr, "p3: %p ~ %p\n", p3, p3+0x80); 显示的四个地址没有做类型转换导致显示出来的地址范围很大 p4: 0x1e2b0a0 ~ 0x1e2b8e0 p3: 0x1e2b130 ~ 0x1e2b530 how2heap中的代码是有做类型转换的 fprintf(stderr, "\np4 has been allocated at %p and ends at %p\n", (char *)p4, (char *)p4+evil_region_size);