aboutsummaryrefslogtreecommitdiffstats
path: root/src/fuzzer/fuzzers.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/fuzzer/fuzzers.h')
-rw-r--r--src/fuzzer/fuzzers.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/fuzzer/fuzzers.h b/src/fuzzer/fuzzers.h
index 2f1b1346d..d0e6b85f5 100644
--- a/src/fuzzer/fuzzers.h
+++ b/src/fuzzer/fuzzers.h
@@ -90,6 +90,22 @@ int main(int argc, char* argv[])
}
}
+#elif defined(BOTAN_FUZZER_IS_KLEE)
+
+#include <klee/klee.h>
+
+int main(int argc, char* argv[])
+ {
+ LLVMFuzzerInitialize(&argc, &argv);
+
+ uint8_t input[max_fuzzer_input_size] = { 0 };
+ klee_make_symbolic(&input, sizeof(input), "input");
+
+ size_t input_len = klee_range(0, sizeof(input), "input_len");
+
+ LLVMFuzzerTestOneInput(input, input_len);
+ }
+
#endif
#endif