MCPcopy Create free account
hub / github.com/ada-url/ada / roller_fuzz

Function roller_fuzz

tests/basic_fuzzer.cpp:102–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100
101template <class result>
102size_t roller_fuzz(size_t N) {
103 size_t valid{};
104
105 for (std::string copy : url_examples) {
106 for (size_t index = 0; index < copy.size(); index++) {
107 char orig = copy[index];
108 for (unsigned int value = 0; value < 255; value++) {
109 copy[index] = char(value);
110 auto url = ada_parse<result>(copy);
111 if (url) {
112 valid++;
113 }
114 }
115 copy[index] = orig;
116 }
117 }
118 return valid;
119}
120
121int main() {
122 if (std::endian::native == std::endian::big) {

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected