From 5a02e9c100ca49c580ac50bfb88d101d88553972 Mon Sep 17 00:00:00 2001 From: Nuno Goncalves Date: Sun, 3 Mar 2019 21:45:01 +0100 Subject: Add URI class to parse IPv4, IPv6 and domain names together with port number Signed-off-by: Nuno Goncalves --- src/fuzzer/uri.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/fuzzer/uri.cpp (limited to 'src/fuzzer') diff --git a/src/fuzzer/uri.cpp b/src/fuzzer/uri.cpp new file mode 100644 index 000000000..89066d283 --- /dev/null +++ b/src/fuzzer/uri.cpp @@ -0,0 +1,20 @@ +/* +* (C) 2019 Nuno Goncalves +* +* Botan is released under the Simplified BSD License (see license.txt) +*/ + +#include "fuzzers.h" +#include + +void fuzz(const uint8_t in[], size_t len) + { + if(len > max_fuzzer_input_size) + return; + + try + { + Botan::URI::fromAny(std::string(reinterpret_cast(in), len)); + } + catch(Botan::Exception& e) { } + } -- cgit v1.2.3