We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 37b4c6b commit 8bc8beeCopy full SHA for 8bc8bee
lab5/antiasan.c
@@ -4,11 +4,8 @@
4
5
void antiasan(unsigned long addr)
6
{
7
- // addr 是 &gBadBuf,gS 緊接在它前面 0x18 bytes
8
- // 我們直接往前退 0x20 bytes,解毒整塊 gS + 之後很大一段,
9
- // 確保把中間那段紅區(redzone) 都 unpoison 掉
10
void *start = (void*)(addr - 0x20);
11
- size_t len = 0x200; // 解毒 0x200 bytes(512 bytes),足夠覆蓋所有紅區
+ size_t len = 0x200; // 0x200 bytes=512 bytes,足夠覆蓋所有紅區
12
13
__asan_unpoison_memory_region(start, len);
14
}
0 commit comments