22 const auto key_bytes{ConsumeFixedLengthByteVector<std::byte>(fuzzed_data_provider,
Obfuscation::KEY_SIZE)};
24 fuzzed_file_provider.open(),
32 std::array<std::byte, 4096> arr{};
34 auto_file.read({arr.data(), fuzzed_data_provider.ConsumeIntegralInRange<
size_t>(0, 4096)});
35 }
catch (
const std::ios_base::failure&) {
39 const std::array<std::byte, 4096> arr{};
41 auto_file.write({arr.data(), fuzzed_data_provider.ConsumeIntegralInRange<
size_t>(0, 4096)});
42 }
catch (
const std::ios_base::failure&) {
47 auto_file.ignore(fuzzed_data_provider.ConsumeIntegralInRange<
size_t>(0, 4096));
48 }
catch (
const std::ios_base::failure&) {
52 (void)auto_file.fclose();
61 (void)auto_file.IsNull();
62 if (fuzzed_data_provider.ConsumeBool()) {
63 FILE* f = auto_file.release();
68 (void)auto_file.fclose();
void ReadFromStream(AddrMan &addr, DataStream &ssPeers)
Only used by tests.
Non-refcounted RAII wrapper for FILE*.
static constexpr size_t KEY_SIZE
#define LIMITED_WHILE(condition, limit)
Can be used to limit a theoretically unbounded loop.
size_t CallOneOf(FuzzedDataProvider &fuzzed_data_provider, Callables... callables)
void WriteToStream(FuzzedDataProvider &fuzzed_data_provider, Stream &stream) noexcept