diff options
author | Nuno Goncalves <[email protected]> | 2019-03-03 21:45:01 +0100 |
---|---|---|
committer | Nuno Goncalves <[email protected]> | 2019-10-14 15:59:38 +0200 |
commit | 5a02e9c100ca49c580ac50bfb88d101d88553972 (patch) | |
tree | c7638364a0fe57bbf59ef32de24a3aca313c2f2c /src/fuzzer | |
parent | eed3adbba406221fbb6c5d932b48c813c41429f8 (diff) |
Add URI class to parse IPv4, IPv6 and domain names together with port number
Signed-off-by: Nuno Goncalves <[email protected]>
Diffstat (limited to 'src/fuzzer')
-rw-r--r-- | src/fuzzer/uri.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
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 <[email protected]> +* +* 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) { } + } |