about summary refs log tree commit diff
path: root/examples/aflpp_driver/aflpp_driver_test.c
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-07-30 17:09:22 +0200
committervan Hauser <vh@thc.org>2020-07-30 17:09:22 +0200
commitea9ba53cdbc6d175f3f055c9a308668ebaacda1e (patch)
treee902b997bf3967a43f3a307e40aebde9675ac26d /examples/aflpp_driver/aflpp_driver_test.c
parent1ba48a5ba06106148b1b0e8d56472738fb2ce44c (diff)
downloadafl++-ea9ba53cdbc6d175f3f055c9a308668ebaacda1e.tar.gz
fix oob reads, code-format
Diffstat (limited to 'examples/aflpp_driver/aflpp_driver_test.c')
-rw-r--r--examples/aflpp_driver/aflpp_driver_test.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/examples/aflpp_driver/aflpp_driver_test.c b/examples/aflpp_driver/aflpp_driver_test.c
index 83278f5c..e4567bbf 100644
--- a/examples/aflpp_driver/aflpp_driver_test.c
+++ b/examples/aflpp_driver/aflpp_driver_test.c
@@ -6,18 +6,20 @@
 
 int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
 
-  fprintf(stderr, "FUNC crc: %016llx len: %lu\n", hash64((u8*)Data, (unsigned int) Size, (unsigned long long int) 0xa5b35705), Size);
-  
-  if (Size < 5)
-    return 0;
+  fprintf(stderr, "FUNC crc: %016llx len: %lu\n",
+          hash64((u8 *)Data, (unsigned int)Size,
+                 (unsigned long long int)0xa5b35705),
+          Size);
+
+  if (Size < 5) return 0;
 
   if (Data[0] == 'F')
     if (Data[1] == 'A')
       if (Data[2] == '$')
         if (Data[3] == '$')
-          if (Data[4] == '$')
-            abort();
-          
+          if (Data[4] == '$') abort();
+
   return 0;
 
 }
+