blob: 8b85ed5104a914450dab279f2e26b990c3cb50ae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
/*
* call_syscall.c:
* you can figure it out ;)
* written by palmers / teso
*/
#include <stdio.h>
#include <errno.h>
#include <asm/unistd.h>
#define __NR_evilmalloc 251
int main ()
{
int x = 1024;
void *xx = NULL;
_syscall1 (void *, evilmalloc, int, x);
xx = evilmalloc (x);
if ((unsigned int) xx == 0xffffffff)
printf ("evilmalloc failed?\n");
printf ("evilmalloc: %d bytes at %p\n", x, (unsigned int) xx);
return 0;
}
|