Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/external/source/byakugan/test/testTenk.c
24707 views
1
#include <windows.h>
2
3
#define NUMPTRS 10
4
5
int main(int argc, char **argv) {
6
char *foo[NUMPTRS];
7
int i;
8
9
Sleep(10000);
10
11
for (i = 0; i < NUMPTRS; i++) {
12
foo[i] = malloc(256);
13
printf("%d: 0x%08x\n", i, foo[i]);
14
}
15
__asm {
16
int 3
17
}
18
for (i = 0; i < NUMPTRS; i+=2) {
19
free(foo[i]);
20
}
21
free(foo[1]);
22
free(foo[7]);
23
free(foo[3]);
24
__asm {
25
int 3
26
}
27
}
28
29