| 100 | |
| 101 | template <class result> |
| 102 | size_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 | |
| 121 | int main() { |
| 122 | if (std::endian::native == std::endian::big) { |