about summary refs log tree commit diff
path: root/custom_mutators/libfuzzer/FuzzerExtFunctionsWindows.cpp
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-09-11 08:56:28 +0200
committervan Hauser <vh@thc.org>2020-09-11 08:56:28 +0200
commit862b6d0382a132cc5338cfdcdc2c30c2cd8d578b (patch)
treed324cfafb78efa62de6f65656f7a196ab7e6ccb1 /custom_mutators/libfuzzer/FuzzerExtFunctionsWindows.cpp
parent543765bc0df02ef7d2db3690383a857ca7963286 (diff)
downloadafl++-862b6d0382a132cc5338cfdcdc2c30c2cd8d578b.tar.gz
fix for afl-compiler-rt to only send dictionary data if there is some
Diffstat (limited to 'custom_mutators/libfuzzer/FuzzerExtFunctionsWindows.cpp')
-rw-r--r--custom_mutators/libfuzzer/FuzzerExtFunctionsWindows.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/custom_mutators/libfuzzer/FuzzerExtFunctionsWindows.cpp b/custom_mutators/libfuzzer/FuzzerExtFunctionsWindows.cpp
index a727220a..d79421cd 100644
--- a/custom_mutators/libfuzzer/FuzzerExtFunctionsWindows.cpp
+++ b/custom_mutators/libfuzzer/FuzzerExtFunctionsWindows.cpp
@@ -45,15 +45,16 @@ using namespace fuzzer;
   #endif  // LIBFUZZER_MSVC
 
 extern "C" {
-\
-  #define EXT_FUNC(NAME, RETURN_TYPE, FUNC_SIG, WARN)         \
-    RETURN_TYPE NAME##Def FUNC_SIG {                          \
-                                                              \
-      Printf("ERROR: Function \"%s\" not defined.\n", #NAME); \
-      exit(1);                                                \
-                                                              \
-    }                                                         \
-    EXTERNAL_FUNC(NAME, NAME##Def) RETURN_TYPE NAME FUNC_SIG
+
+#define EXT_FUNC(NAME, RETURN_TYPE, FUNC_SIG, WARN)
+    RETURN_TYPE NAME##Def FUNC_SIG {
+
+  Printf("ERROR: Function \"%s\" not defined.\n", #NAME);
+  exit(1);
+
+}
+
+EXTERNAL_FUNC(NAME, NAME##Def) RETURN_TYPE NAME FUNC_SIG
 
   #include "FuzzerExtFunctions.def"
 
@@ -80,8 +81,8 @@ namespace fuzzer {
 
 ExternalFunctions::ExternalFunctions() {
 \
-  #define EXT_FUNC(NAME, RETURN_TYPE, FUNC_SIG, WARN) \
-    this->NAME = GetFnPtr<decltype(::NAME)>(::NAME, ::NAME##Def, #NAME, WARN);
+  #define EXT_FUNC(NAME, RETURN_TYPE, FUNC_SIG, WARN) this->NAME =
+      GetFnPtr < decltype(::NAME)>(::NAME, ::NAME##Def, #NAME, WARN);
 
   #include "FuzzerExtFunctions.def"