mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
Make BufferedFile to be a CAutoFile wrapper
This refactor allows to forward some calls to the underlying CAutoFile, instead of re-implementing the logic in the buffered file.
This commit is contained in:
@@ -21,7 +21,7 @@ FUZZ_TARGET(buffered_file)
|
||||
std::optional<BufferedFile> opt_buffered_file;
|
||||
CAutoFile fuzzed_file{fuzzed_file_provider.open(), 0};
|
||||
try {
|
||||
opt_buffered_file.emplace(fuzzed_file.Get(), fuzzed_data_provider.ConsumeIntegralInRange<uint64_t>(0, 4096), fuzzed_data_provider.ConsumeIntegralInRange<uint64_t>(0, 4096), fuzzed_data_provider.ConsumeIntegral<int>());
|
||||
opt_buffered_file.emplace(fuzzed_file, fuzzed_data_provider.ConsumeIntegralInRange<uint64_t>(0, 4096), fuzzed_data_provider.ConsumeIntegralInRange<uint64_t>(0, 4096));
|
||||
} catch (const std::ios_base::failure&) {
|
||||
}
|
||||
if (opt_buffered_file && !fuzzed_file.IsNull()) {
|
||||
|
||||
Reference in New Issue
Block a user