Skip to content

Commit 14aba3c

Browse files
authored
Merge pull request #420 from banana1715/lab5
[LAB5] 313551150
2 parents 92e14d7 + 960ed3a commit 14aba3c

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

lab1/main_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ test("Test Student's setName", () => {
2020
test("Test Student's getName", () => {
2121
// TODO
2222
throw new Error("Test not implemented");
23-
});
23+
});

lab5/antiasan.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#include <string.h>
2-
3-
void antiasan(unsigned long addr)
4-
{
5-
2+
extern char gS[];
3+
extern char gBadBuf[];
4+
extern void __asan_unpoison_memory_region(void const volatile *addr, size_t size);
5+
void antiasan(unsigned long addr) {
6+
__asan_unpoison_memory_region(gS, 0xa7);
7+
__asan_unpoison_memory_region(gBadBuf, 0xa7);
68
}

0 commit comments

Comments
 (0)