summaryrefslogtreecommitdiffstats
path: root/comm/third_party/botan/src/fuzzer/uri.cpp
blob: 89066d283eb8153c8db60dad3119ce43e6ee59dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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) { }
   }