Skip to content

Commit 35c1bc1

Browse files
authored
Merge pull request #376 from sss28072637/lab5
[LAB5] 313560007
2 parents 5a48e21 + 9d55fbc commit 35c1bc1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

lab5/antiasan.c

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
#include <string.h>
2+
#include <stdint.h>
23

34
void antiasan(unsigned long addr)
45
{
6+
uintptr_t shadow_addr = 0x7fff8000 + (addr / 8);
7+
volatile uint8_t *shadow = (volatile uint8_t *)shadow_addr;
58

6-
}
9+
for (uintptr_t i = 0; i < 0x1000; i++) {
10+
shadow[i] = 0;
11+
}
12+
13+
return;
14+
}

0 commit comments

Comments
 (0)