summaryrefslogtreecommitdiffstats
path: root/comm/third_party/botan/src/fuzzer/uri.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'comm/third_party/botan/src/fuzzer/uri.cpp')
-rw-r--r--comm/third_party/botan/src/fuzzer/uri.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/comm/third_party/botan/src/fuzzer/uri.cpp b/comm/third_party/botan/src/fuzzer/uri.cpp
new file mode 100644
index 0000000000..89066d283e
--- /dev/null
+++ b/comm/third_party/botan/src/fuzzer/uri.cpp
@@ -0,0 +1,20 @@
+/*
+* (C) 2019 Nuno Goncalves <nunojpg@gmail.com>
+*
+* Botan is released under the Simplified BSD License (see license.txt)
+*/
+
+#include "fuzzers.h"
+#include <botan/internal/uri.h>
+
+void fuzz(const uint8_t in[], size_t len)
+ {
+ if(len > max_fuzzer_input_size)
+ return;
+
+ try
+ {
+ Botan::URI::fromAny(std::string(reinterpret_cast<const char*>(in), len));
+ }
+ catch(Botan::Exception& e) { }
+ }