mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-01 00:34:01 +02:00
refactor: encapsulate vector/array keys into Obfuscation
This commit is contained in:
@@ -22,7 +22,7 @@ FUZZ_TARGET(autofile)
|
||||
const auto key_bytes{ConsumeFixedLengthByteVector<std::byte>(fuzzed_data_provider, Obfuscation::KEY_SIZE)};
|
||||
AutoFile auto_file{
|
||||
fuzzed_file_provider.open(),
|
||||
key_bytes,
|
||||
Obfuscation{std::span{key_bytes}.first<Obfuscation::KEY_SIZE>()},
|
||||
};
|
||||
LIMITED_WHILE(fuzzed_data_provider.ConsumeBool(), 100)
|
||||
{
|
||||
|
||||
@@ -24,7 +24,7 @@ FUZZ_TARGET(buffered_file)
|
||||
const auto key_bytes{ConsumeFixedLengthByteVector<std::byte>(fuzzed_data_provider, Obfuscation::KEY_SIZE)};
|
||||
AutoFile fuzzed_file{
|
||||
fuzzed_file_provider.open(),
|
||||
key_bytes,
|
||||
Obfuscation{std::span{key_bytes}.first<Obfuscation::KEY_SIZE>()},
|
||||
};
|
||||
try {
|
||||
auto n_buf_size = fuzzed_data_provider.ConsumeIntegralInRange<uint64_t>(0, 4096);
|
||||
|
||||
Reference in New Issue
Block a user