mirror of
https://github.com/tmux/tmux.git
synced 2024-12-24 01:58:46 +00:00
Bring back fuzz.c.
This commit is contained in:
parent
1cec111af3
commit
96601ce9fe
31
tools/fuzz.c
Normal file
31
tools/fuzz.c
Normal file
@ -0,0 +1,31 @@
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
time_t t;
|
||||
int i;
|
||||
|
||||
setvbuf(stdout, NULL, _IONBF, 0);
|
||||
|
||||
t = time(NULL);
|
||||
srandom((u_int) t);
|
||||
|
||||
for (;;) {
|
||||
putchar('\033');
|
||||
|
||||
for (i = 0; i < random() % 25; i++) {
|
||||
if (i > 22)
|
||||
putchar(';');
|
||||
else
|
||||
putchar(random() % 256);
|
||||
}
|
||||
|
||||
/* usleep(100); */
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user