From dbc71526364623c3f22c1bd5457276ec49994c4d Mon Sep 17 00:00:00 2001 From: Davide Berardi Date: Sun, 24 Jan 2021 12:28:41 +0100 Subject: [PATCH] Snappy fuzzer --- snappy-fox.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/snappy-fox.c b/snappy-fox.c index fda975a..2eb9fca 100644 --- a/snappy-fox.c +++ b/snappy-fox.c @@ -421,6 +421,9 @@ int main(int argc, char **argv) { return 1; } +#ifdef __AFL_LOOP + while (__AFL_LOOP(1000)) { +#endif in = open_read_file(argv[1]); if (in == NULL) { perror("fopen"); @@ -448,6 +451,9 @@ close_in: perror("close"); exit_point: prdebug("Exiting %d\n", ret); +#ifdef __AFL_LOOP + } +#endif return ret; }