From: Ondřej Surý Date: Thu, 13 Aug 2020 15:55:38 +0000 (+0200) Subject: Move the debug variable from main.c to individual fuzzer X-Git-Tag: v9.17.5~49^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=915616a34e67d082e3db6928a5712cc8bf75c937;p=thirdparty%2Fbind9.git Move the debug variable from main.c to individual fuzzer The fuzzers needs to be completely independent of the main.c for OSS-Fuzz to work. --- diff --git a/fuzz/dns_name_fromtext_target.c b/fuzz/dns_name_fromtext_target.c index e85e61e33a8..f412bfd036f 100644 --- a/fuzz/dns_name_fromtext_target.c +++ b/fuzz/dns_name_fromtext_target.c @@ -20,6 +20,8 @@ #include "fuzz.h" +bool debug = false; + static isc_mem_t *mctx = NULL; int diff --git a/fuzz/dns_rdata_fromwire_text.c b/fuzz/dns_rdata_fromwire_text.c index a71ba5ef37c..82941143a68 100644 --- a/fuzz/dns_rdata_fromwire_text.c +++ b/fuzz/dns_rdata_fromwire_text.c @@ -28,6 +28,8 @@ #include "fuzz.h" +bool debug = false; + /* * Fuzz input to dns_rdata_fromwire(). Then convert the result * to text, back to wire format, to multiline text, and back to wire diff --git a/fuzz/isc_lex_getmastertoken.c b/fuzz/isc_lex_getmastertoken.c index 2649dd0cfbf..64d4727332c 100644 --- a/fuzz/isc_lex_getmastertoken.c +++ b/fuzz/isc_lex_getmastertoken.c @@ -20,6 +20,8 @@ #include "fuzz.h" +bool debug = false; + int LLVMFuzzerInitialize(int *argc __attribute__((unused)), char ***argv __attribute__((unused))); diff --git a/fuzz/isc_lex_gettoken.c b/fuzz/isc_lex_gettoken.c index c87086bb27c..2fed94bcf67 100644 --- a/fuzz/isc_lex_gettoken.c +++ b/fuzz/isc_lex_gettoken.c @@ -19,6 +19,8 @@ #include "fuzz.h" +bool debug = false; + static isc_mem_t *mctx = NULL; static isc_lex_t *lex = NULL; diff --git a/fuzz/main.c b/fuzz/main.c index 85a9031a0f7..d95d6f3fca6 100644 --- a/fuzz/main.c +++ b/fuzz/main.c @@ -24,8 +24,6 @@ #include -bool debug = false; - static void test_all_from(const char *dirname) { DIR *dirp;