22 fuzzed_file_provider.open(),
23 ConsumeRandomLengthByteVector<std::byte>(fuzzed_data_provider),
30 std::array<std::byte, 4096> arr{};
32 auto_file.read({arr.data(), fuzzed_data_provider.ConsumeIntegralInRange<
size_t>(0, 4096)});
33 }
catch (
const std::ios_base::failure&) {
37 const std::array<std::byte, 4096> arr{};
39 auto_file.write({arr.data(), fuzzed_data_provider.ConsumeIntegralInRange<
size_t>(0, 4096)});
40 }
catch (
const std::ios_base::failure&) {
45 auto_file.ignore(fuzzed_data_provider.ConsumeIntegralInRange<
size_t>(0, 4096));
46 }
catch (
const std::ios_base::failure&) {
59 (void)auto_file.IsNull();
60 if (fuzzed_data_provider.ConsumeBool()) {
61 FILE* f = auto_file.release();
void ReadFromStream(AddrMan &addr, DataStream &ssPeers)
Only used by tests.
Non-refcounted RAII wrapper for FILE*.
#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