summaryrefslogtreecommitdiff
path: root/other/wrez/inmem-test.c
blob: ed15e35f9343838257e4c1d290a018ce97728f0d (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

/* small victim program to test in-memory infection with
 */

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>


int
main (int argc, char *argv[])
{
	int	i = 0;

	srandom (time (NULL));

	for (;;) {
		printf ("test %5d\n", i++);
		usleep (400000);
		(void) malloc (random () % 16384);
	}
}