fix lto single block and no zero

This commit is contained in:
van Hauser
2020-08-01 19:43:29 +02:00
parent a267ff1ab5
commit b708cf7d45
5 changed files with 36 additions and 20 deletions

View File

@ -30,13 +30,16 @@
/* this lets the source compile without afl-clang-fast/lto */
#ifndef __AFL_FUZZ_TESTCASE_LEN
ssize_t fuzz_len;
#define __AFL_FUZZ_TESTCASE_LEN fuzz_len
ssize_t fuzz_len;
unsigned char fuzz_buf[1024000];
#define __AFL_FUZZ_TESTCASE_LEN fuzz_len
#define __AFL_FUZZ_TESTCASE_BUF fuzz_buf
#define __AFL_FUZZ_INIT() void sync(void);
#define __AFL_LOOP(x) ((fuzz_len = read(0, fuzz_buf, sizeof(fuzz_buf))) > 0 ?
#define __AFL_INIT() sync()
#define __AFL_INIT() sync()
#endif
__AFL_FUZZ_INIT();