mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
d4be41a3ad
The new encoding is `0` for `Nothing` and `[1, x]` for `Just x`.
24 lines
506 B
C
24 lines
506 B
C
#include "driver.h"
|
|
|
|
#include <unistd.h>
|
|
|
|
// The number of afl iterations before terminating the process and starting a
|
|
// new one.
|
|
// See https://github.com/mcarpenter/afl/blob/master/llvm_mode/README.llvm.
|
|
#define ITERATIONS 1000
|
|
|
|
#ifdef __GLASGOW_HASKELL__
|
|
#define main fuzz_main
|
|
#endif
|
|
int main(int argc, char **argv)
|
|
{
|
|
struct settings cfg = {false, false, false};
|
|
#ifdef __AFL_LOOP
|
|
|
|
while (__AFL_LOOP(ITERATIONS))
|
|
#endif
|
|
communicate(cfg, STDIN_FILENO, STDOUT_FILENO);
|
|
|
|
return 0;
|
|
}
|