about summary refs log tree commit diff
path: root/examples/aflpp_driver/aflpp_driver.cpp
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-06-15 21:39:45 +0200
committervan Hauser <vh@thc.org>2020-06-15 21:39:45 +0200
commit6a216b5708a21283c2a8dbc05af6c98c067b9e08 (patch)
treed2cd03c5b802e85524fc3908e87e44115129e946 /examples/aflpp_driver/aflpp_driver.cpp
parentf6d2da27e3a23436b3d13d8c9abf702edbffffb4 (diff)
downloadafl++-6a216b5708a21283c2a8dbc05af6c98c067b9e08.tar.gz
make aflpp driver performant again
Diffstat (limited to 'examples/aflpp_driver/aflpp_driver.cpp')
-rw-r--r--examples/aflpp_driver/aflpp_driver.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/examples/aflpp_driver/aflpp_driver.cpp b/examples/aflpp_driver/aflpp_driver.cpp
index 68a1783f..cf96dc4f 100644
--- a/examples/aflpp_driver/aflpp_driver.cpp
+++ b/examples/aflpp_driver/aflpp_driver.cpp
@@ -230,8 +230,6 @@ static int ExecuteFilesOnyByOne(int argc, char **argv) {
 }
 
 int main(int argc, char **argv) {
-  unsigned char in_buf[1024000];
-  size_t in_buf_len;
   Printf(
       "======================= INFO =========================\n"
       "This binary is built for AFL-fuzz.\n"
@@ -287,9 +285,7 @@ int main(int argc, char **argv) {
 #endif
     if (*__afl_fuzz_len) {
       num_runs++;
-      in_buf_len = *__afl_fuzz_len;
-      memcpy(in_buf, __afl_fuzz_ptr, in_buf_len);
-      LLVMFuzzerTestOneInput(in_buf, in_buf_len);
+      LLVMFuzzerTestOneInput(__afl_fuzz_ptr, *__afl_fuzz_len);
     }
   }
   Printf("%s: successfully executed %d input(s)\n", argv[0], num_runs);