1 | #include "stub.h" |
---|---|
2 | |
3 | void *(*memcpy_p)(void *dest, const void *src, unsigned long n); |
4 | void *(*memset_p)(void *dest, int c, unsigned long n); |
5 | |
6 | int main() { |
7 | int a = 0xdeadbeef, b = 0; |
8 | |
9 | memcpy_p = memcpy; |
10 | memcpy_p(&b, &a, sizeof(b)); |
11 | if (b != 0xdeadbeef) |
12 | return 1; |
13 | |
14 | memset_p = memset; |
15 | memset_p(&a, 0, sizeof(a)); |
16 | if (a != 0) |
17 | return 1; |
18 | |
19 | printf(format: "Test completed\n"); |
20 | } |
21 |