about summary refs log tree commit diff
path: root/examples/aflpp_driver/aflpp_driver_test.c
diff options
context:
space:
mode:
authorhexcoder- <heiko@hexco.de>2020-07-30 13:48:16 +0200
committerhexcoder- <heiko@hexco.de>2020-07-30 13:48:16 +0200
commit13350bf22f79250e73b7c7e43ca6f687e4a277cb (patch)
treed174daa2ca53ebc7b8e7145f484350ba6036c31e /examples/aflpp_driver/aflpp_driver_test.c
parent5ce55d87ecf5d3f0e8fbd0e1ce68f74efb0cf528 (diff)
parentfc401f1acc61b73f328a16ac10bed268134c495e (diff)
downloadafl++-13350bf22f79250e73b7c7e43ca6f687e4a277cb.tar.gz
Merge branch 'dev' of https://github.com/AFLplusplus/AFLplusplus into dev
Diffstat (limited to 'examples/aflpp_driver/aflpp_driver_test.c')
-rw-r--r--examples/aflpp_driver/aflpp_driver_test.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/examples/aflpp_driver/aflpp_driver_test.c b/examples/aflpp_driver/aflpp_driver_test.c
new file mode 100644
index 00000000..83278f5c
--- /dev/null
+++ b/examples/aflpp_driver/aflpp_driver_test.c
@@ -0,0 +1,23 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+
+#include "hash.h"
+
+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;
+
+  if (Data[0] == 'F')
+    if (Data[1] == 'A')
+      if (Data[2] == '$')
+        if (Data[3] == '$')
+          if (Data[4] == '$')
+            abort();
+          
+  return 0;
+
+}