MCPcopy Create free account
hub / github.com/ElementsProject/elements / FUZZ_TARGET

Function FUZZ_TARGET

src/test/fuzz/string.cpp:133–290  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131}; // namespace
132
133FUZZ_TARGET(string)
134{
135 FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
136 const std::string random_string_1 = fuzzed_data_provider.ConsumeRandomLengthString(32);
137 const std::string random_string_2 = fuzzed_data_provider.ConsumeRandomLengthString(32);
138 const std::vector<std::string> random_string_vector = ConsumeRandomLengthStringVector(fuzzed_data_provider);
139
140 (void)AmountErrMsg(random_string_1, random_string_2);
141 (void)AmountHighWarn(random_string_1);
142 BlockFilterType block_filter_type;
143 (void)BlockFilterTypeByName(random_string_1, block_filter_type);
144 (void)Capitalize(random_string_1);
145 (void)CopyrightHolders(random_string_1);
146 FeeEstimateMode fee_estimate_mode;
147 (void)FeeModeFromString(random_string_1, fee_estimate_mode);
148 const auto width{fuzzed_data_provider.ConsumeIntegralInRange<size_t>(1, 1000)};
149 (void)FormatParagraph(random_string_1, width, fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, width));
150 (void)FormatSubVersion(random_string_1, fuzzed_data_provider.ConsumeIntegral<int>(), random_string_vector);
151 (void)GetDescriptorChecksum(random_string_1);
152 (void)HelpExampleCli(random_string_1, random_string_2);
153 (void)HelpExampleRpc(random_string_1, random_string_2);
154 (void)HelpMessageGroup(random_string_1);
155 (void)HelpMessageOpt(random_string_1, random_string_2);
156 (void)IsDeprecatedRPCEnabled(random_string_1);
157 (void)Join(random_string_vector, random_string_1);
158 (void)JSONRPCError(fuzzed_data_provider.ConsumeIntegral<int>(), random_string_1);
159 const util::Settings settings;
160 (void)OnlyHasDefaultSectionSetting(settings, random_string_1, random_string_2);
161 (void)ParseNetwork(random_string_1);
162 try {
163 (void)ParseNonRFCJSONValue(random_string_1);
164 } catch (const std::runtime_error&) {
165 }
166 (void)ParseOutputType(random_string_1);
167 (void)RemovePrefix(random_string_1, random_string_2);
168 (void)ResolveErrMsg(random_string_1, random_string_2);
169 try {
170 (void)RPCConvertNamedValues(random_string_1, random_string_vector);
171 } catch (const std::runtime_error&) {
172 }
173 try {
174 (void)RPCConvertValues(random_string_1, random_string_vector);
175 } catch (const std::runtime_error&) {
176 }
177 (void)SanitizeString(random_string_1);
178 (void)SanitizeString(random_string_1, fuzzed_data_provider.ConsumeIntegralInRange<int>(0, 3));
179#ifndef WIN32
180 (void)ShellEscape(random_string_1);
181#endif // WIN32
182 uint16_t port_out;
183 std::string host_out;
184 SplitHostPort(random_string_1, port_out, host_out);
185 (void)TimingResistantEqual(random_string_1, random_string_2);
186 (void)ToLower(random_string_1);
187 (void)ToUpper(random_string_1);
188 (void)TrimString(random_string_1);
189 (void)TrimString(random_string_1, random_string_2);
190 (void)urlDecode(random_string_1);

Callers

nothing calls this directly

Calls 15

AmountErrMsgFunction · 0.85
AmountHighWarnFunction · 0.85
BlockFilterTypeByNameFunction · 0.85
CapitalizeFunction · 0.85
CopyrightHoldersFunction · 0.85
FeeModeFromStringFunction · 0.85
FormatParagraphFunction · 0.85
FormatSubVersionFunction · 0.85
GetDescriptorChecksumFunction · 0.85
HelpExampleCliFunction · 0.85
HelpExampleRpcFunction · 0.85

Tested by

no test coverage detected