about summary refs log tree commit diff
path: root/examples/aflpp_driver/aflpp_driver.c
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-08-11 10:24:45 +0200
committervan Hauser <vh@thc.org>2020-08-11 10:24:45 +0200
commit0ba09ee85a65878e70d1a224f9d41fcbac3ff1e5 (patch)
treead22351558d02c9215be35b0ee2846d2ef90e625 /examples/aflpp_driver/aflpp_driver.c
parent67dac152269c48245dca88140b1238b36d5e0954 (diff)
downloadafl++-0ba09ee85a65878e70d1a224f9d41fcbac3ff1e5.tar.gz
enhancements
Diffstat (limited to 'examples/aflpp_driver/aflpp_driver.c')
-rw-r--r--examples/aflpp_driver/aflpp_driver.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/examples/aflpp_driver/aflpp_driver.c b/examples/aflpp_driver/aflpp_driver.c
index 2b7be45f..81782c67 100644
--- a/examples/aflpp_driver/aflpp_driver.c
+++ b/examples/aflpp_driver/aflpp_driver.c
@@ -306,10 +306,13 @@ int main(int argc, char **argv) {
   else if (argc > 1) {
 
     if (!getenv("AFL_DISABLE_LLVM_INSTRUMENTATION")) {
+
       munmap(__afl_area_ptr, MAX_DUMMY_SIZE);  // we need to free 0x10000
       __afl_area_ptr = NULL;
       __afl_manual_init();
+
     }
+
     return ExecuteFilesOnyByOne(argc, argv);
 
   }
@@ -317,11 +320,14 @@ int main(int argc, char **argv) {
   assert(N > 0);
 
   if (!getenv("AFL_DISABLE_LLVM_INSTRUMENTATION")) {
+
     munmap(__afl_area_ptr, MAX_DUMMY_SIZE);
     __afl_area_ptr = NULL;
     fprintf(stderr, "performing manual init\n");
-  __afl_manual_init();
+    __afl_manual_init();
+
   }
+
   fprintf(stderr, "map is now at %p\n", __afl_area_ptr);
 
   // Call LLVMFuzzerTestOneInput here so that coverage caused by initialization
@@ -333,11 +339,7 @@ int main(int argc, char **argv) {
 
     ssize_t r = read(0, buf, sizeof(buf));
 
-    if (r > 0) {
-
-      LLVMFuzzerTestOneInput(buf, r);
-
-    }
+    if (r > 0) { LLVMFuzzerTestOneInput(buf, r); }
 
   }