10 FuzzedDataProvider fdp(data, size);
11 std::string source = fdp.ConsumeRandomLengthString(256);
12 std::string source2 = fdp.ConsumeRandomLengthString(64);
21 volatile size_t length = 0;
22 length += ascii_result.size();
23 length += unicode_result.size();
29 if (!ascii_result.empty()) {
31 length += roundtrip.size();
38 std::u32string utf32_out;
41 length += utf32_out.size();
45 (void)is_valid_punycode;
48 if (punycode_ok && !utf32_out.empty()) {
49 std::string punycode_back;
50 volatile bool encode_ok =
52 length += punycode_back.size();
64 if (utf32_len > 0 && utf32_len < 1024) {
65 std::vector<char32_t> utf32_buf(utf32_len + 1, 0);
74 if (utf8_len > 0 && utf8_len < 4096) {
75 std::string utf8_back(utf8_len,
'\0');
89 std::u32string utf32_label;
91 if (ok && !utf32_label.empty()) {
97 std::u32string ascii_label(source2.begin(), source2.end());
98 if (!ascii_label.empty()) {
100 (void)ascii_label_valid;
109 std::string ascii_copy = source;
111 length += ascii_copy.size();
116 if (utf32_len > 0 && utf32_len < 256) {
117 std::u32string utf32_input(utf32_len, 0);
121 utf32_input.resize(actual);
123 length += mapped.size();
132 volatile bool has_forbidden =
137 volatile bool is_ascii_str =
148 if (utf32_len > 0 && utf32_len < 256) {
149 std::u32string utf32_input(utf32_len, 0);
153 utf32_input.resize(actual);
155 length += utf32_input.size();