summaryrefslogtreecommitdiff
path: root/other/Kermit/src/call_syscall.c
diff options
context:
space:
mode:
authorRoot THC2026-02-24 12:42:47 +0000
committerRoot THC2026-02-24 12:42:47 +0000
commitc9cbeced5b3f2bdd7407e29c0811e65954132540 (patch)
treeaefc355416b561111819de159ccbd86c3004cf88 /other/Kermit/src/call_syscall.c
parent073fe4bf9fca6bf40cef2886d75df832ef4b6fca (diff)
initial
Diffstat (limited to 'other/Kermit/src/call_syscall.c')
-rw-r--r--other/Kermit/src/call_syscall.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/other/Kermit/src/call_syscall.c b/other/Kermit/src/call_syscall.c
new file mode 100644
index 0000000..8b85ed5
--- /dev/null
+++ b/other/Kermit/src/call_syscall.c
@@ -0,0 +1,24 @@
1/*
2 * call_syscall.c:
3 * you can figure it out ;)
4 * written by palmers / teso
5 */
6#include <stdio.h>
7#include <errno.h>
8#include <asm/unistd.h>
9
10#define __NR_evilmalloc 251
11
12int main ()
13{
14 int x = 1024;
15 void *xx = NULL;
16
17 _syscall1 (void *, evilmalloc, int, x);
18 xx = evilmalloc (x);
19 if ((unsigned int) xx == 0xffffffff)
20 printf ("evilmalloc failed?\n");
21 printf ("evilmalloc: %d bytes at %p\n", x, (unsigned int) xx);
22 return 0;
23}
24