about summary refs log tree commit diff
path: root/examples/aflpp_driver
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-06-03 10:50:49 +0200
committervan Hauser <vh@thc.org>2020-06-03 10:50:49 +0200
commitfc164e4709f1f1c91f9343eb116627417e7f267f (patch)
tree335c24fa435c28ca2026e69a0a719daa7e6badef /examples/aflpp_driver
parent1c95e2e8e0674b69bf38e3e097948c6db9f07493 (diff)
downloadafl++-fc164e4709f1f1c91f9343eb116627417e7f267f.tar.gz
code format
Diffstat (limited to 'examples/aflpp_driver')
-rw-r--r--examples/aflpp_driver/aflpp_qemu_driver.c8
-rw-r--r--examples/aflpp_driver/aflpp_qemu_driver_hook.c5
2 files changed, 8 insertions, 5 deletions
diff --git a/examples/aflpp_driver/aflpp_qemu_driver.c b/examples/aflpp_driver/aflpp_qemu_driver.c
index dd272408..d8862316 100644
--- a/examples/aflpp_driver/aflpp_qemu_driver.c
+++ b/examples/aflpp_driver/aflpp_qemu_driver.c
@@ -6,12 +6,14 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size);
 __attribute__((weak)) int LLVMFuzzerInitialize(int *argc, char ***argv);
 
 int main(int argc, char **argv) {
-  if (LLVMFuzzerInitialize)
-    LLVMFuzzerInitialize(&argc, &argv);
+
+  if (LLVMFuzzerInitialize) LLVMFuzzerInitialize(&argc, &argv);
   // Do any other expensive one-time initialization here.
 
   uint8_t dummy_input[1] = {0};
   LLVMFuzzerTestOneInput(dummy_input, 1);
-  
+
   return 0;
+
 }
+
diff --git a/examples/aflpp_driver/aflpp_qemu_driver_hook.c b/examples/aflpp_driver/aflpp_qemu_driver_hook.c
index 17a84668..823cc42d 100644
--- a/examples/aflpp_driver/aflpp_qemu_driver_hook.c
+++ b/examples/aflpp_driver/aflpp_qemu_driver_hook.c
@@ -7,9 +7,9 @@
 #define REGS_RSI 6
 
 void afl_persistent_hook(uint64_t *regs, uint64_t guest_base,
-                         uint8_t* input_buf, uint32_t input_len) {
+                         uint8_t *input_buf, uint32_t input_len) {
 
-  memcpy(g2h(regs[REGS_RDI]), input_buf, input_len); 
+  memcpy(g2h(regs[REGS_RDI]), input_buf, input_len);
   regs[REGS_RSI] = input_len;
 
 }
@@ -19,3 +19,4 @@ int afl_persistent_hook_init(void) {
   return 1;
 
 }
+