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-09-04 15:27:02 +0200
committervan Hauser <vh@thc.org>2020-09-04 15:27:02 +0200
commit6c846bcf2c5f83d7962774f6a5a431f5de740357 (patch)
treeb7144752a56ef5105ebb906f587158b8a0ae2679 /examples/aflpp_driver/aflpp_driver_test.c
parentcea2fadbf4ca1b47be01aa1160d7a11a3a114840 (diff)
downloadafl++-6c846bcf2c5f83d7962774f6a5a431f5de740357.tar.gz
fix driver test
Diffstat (limited to 'examples/aflpp_driver/aflpp_driver_test.c')
-rw-r--r--examples/aflpp_driver/aflpp_driver_test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/aflpp_driver/aflpp_driver_test.c b/examples/aflpp_driver/aflpp_driver_test.c
index ddc3effb..b66c3b37 100644
--- a/examples/aflpp_driver/aflpp_driver_test.c
+++ b/examples/aflpp_driver/aflpp_driver_test.c
@@ -16,13 +16,13 @@ void __attribute__((noinline)) crashme(const uint8_t *Data, size_t Size) {
 
 int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t 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;
-
   crashme(Data, Size);
 
   return 0;