Ada
3.4.3
Fast spec-compliant URL parser
Toggle main menu visibility
Loading...
Searching...
No Matches
can_parse.cc
Go to the documentation of this file.
1
#include <fuzzer/FuzzedDataProvider.h>
2
3
#include <memory>
4
#include <string>
5
6
#include "
ada.cpp
"
7
#include "
ada.h
"
8
9
extern
"C"
int
LLVMFuzzerTestOneInput
(
const
uint8_t *data,
size_t
size) {
10
FuzzedDataProvider fdp(data, size);
11
std::string source = fdp.ConsumeRandomLengthString(256);
12
std::string base_source = fdp.ConsumeRandomLengthString(256);
13
17
auto
base_source_view =
18
std::string_view(base_source.data(), base_source.length());
19
ada::can_parse
(source);
20
ada::can_parse
(source, &base_source_view);
21
22
return
0;
23
}
ada.cpp
ada.h
Main header for the Ada URL parser library.
LLVMFuzzerTestOneInput
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
Definition
can_parse.cc:9
ada::can_parse
bool can_parse(std::string_view input, const std::string_view *base_input=nullptr)
Definition
implementation.cpp:51