]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Move the debug variable from main.c to individual fuzzer
authorOndřej Surý <ondrej@isc.org>
Thu, 13 Aug 2020 15:55:38 +0000 (17:55 +0200)
committerOndřej Surý <ondrej@isc.org>
Thu, 13 Aug 2020 15:55:38 +0000 (17:55 +0200)
The fuzzers needs to be completely independent of the main.c for
OSS-Fuzz to work.

fuzz/dns_name_fromtext_target.c
fuzz/dns_rdata_fromwire_text.c
fuzz/isc_lex_getmastertoken.c
fuzz/isc_lex_gettoken.c
fuzz/main.c

index e85e61e33a88f16d91620f4be84ff9051aff64e2..f412bfd036f91b32350fd36c90945c6571d4ba0f 100644 (file)
@@ -20,6 +20,8 @@
 
 #include "fuzz.h"
 
+bool debug = false;
+
 static isc_mem_t *mctx = NULL;
 
 int
index a71ba5ef37caf12433220d0f25d1087b66b5464d..82941143a68ba4293582a6cd6bd37d62db3f3c5e 100644 (file)
@@ -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
index 2649dd0cfbf9ef2521d6bab5d0109ddf1e93446d..64d4727332c1d086ceb1217eca5a3b1e5f485d53 100644 (file)
@@ -20,6 +20,8 @@
 
 #include "fuzz.h"
 
+bool debug = false;
+
 int
 LLVMFuzzerInitialize(int *argc __attribute__((unused)),
                     char ***argv __attribute__((unused)));
index c87086bb27ce6ede2410d5c1d4457bdaf1c4142d..2fed94bcf67267c8a7d2ee15b064f9fbd5c53417 100644 (file)
@@ -19,6 +19,8 @@
 
 #include "fuzz.h"
 
+bool debug = false;
+
 static isc_mem_t *mctx = NULL;
 static isc_lex_t *lex = NULL;
 
index 85a9031a0f7d28e1888018e342177f14224666e5..d95d6f3fca62fcfe1d429e3fd49fc87962f7cd10 100644 (file)
@@ -24,8 +24,6 @@
 
 #include <dirent.h>
 
-bool debug = false;
-
 static void
 test_all_from(const char *dirname) {
        DIR *dirp;