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

Function ConsumeRandomLengthByteVector

src/test/fuzz/util.h:103–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103[[nodiscard]] inline std::vector<uint8_t> ConsumeRandomLengthByteVector(FuzzedDataProvider& fuzzed_data_provider, const std::optional<size_t>& max_length = std::nullopt) noexcept
104{
105 const std::string s = max_length ?
106 fuzzed_data_provider.ConsumeRandomLengthString(*max_length) :
107 fuzzed_data_provider.ConsumeRandomLengthString();
108 return {s.begin(), s.end()};
109}
110
111[[nodiscard]] inline std::vector<bool> ConsumeRandomLengthBitVector(FuzzedDataProvider& fuzzed_data_provider, const std::optional<size_t>& max_length = std::nullopt) noexcept
112{

Callers 15

FUZZ_TARGETFunction · 0.85
FUZZ_TARGETFunction · 0.85
FUZZ_TARGETFunction · 0.85
FUZZ_TARGETFunction · 0.85
FUZZ_TARGETFunction · 0.85
FUZZ_TARGET_INITFunction · 0.85
FUZZ_TARGETFunction · 0.85
FUZZ_TARGETFunction · 0.85
FUZZ_TARGETFunction · 0.85
FUZZ_TARGET_INITFunction · 0.85
FUZZ_TARGETFunction · 0.85
FUZZ_TARGET_INITFunction · 0.85

Calls 3

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected