mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02: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:
parent
fa389d902f
commit
9999b89cd3
9 changed files with 23 additions and 27 deletions
|
|
@ -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()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue