Skip to content

Commit 20f907e

Browse files
authored
Merge pull request #370 from sa-llo/lab5
[LAB5] 313704803
2 parents f513672 + f8a3323 commit 20f907e

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

lab5/antiasan.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
#include <string.h>
2-
3-
void antiasan(unsigned long addr)
4-
{
1+
#include <stdint.h>
52

3+
void antiasan(unsigned long target) {
4+
uint64_t pos = (uint64_t)target + 0xC0 + 24;
5+
uint8_t *sh = (uint8_t *)((pos >> 3) + 0x7fff8000ULL);
6+
int count = 5;
7+
do {
8+
*sh++ = 0;
9+
} while (--count);
610
}

0 commit comments

Comments
 (0)