mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
fuzz: Use correct variant of ConsumeRandomLengthString instead of hardcoding a maximum size
This is technically a breaking change. This allows the fuzz engine to pick the right size, also larger sizes, if needed.
This commit is contained in:
@@ -276,7 +276,7 @@ CScriptWitness ConsumeScriptWitness(FuzzedDataProvider& fuzzed_data_provider, co
|
||||
return ret;
|
||||
}
|
||||
|
||||
CScript ConsumeScript(FuzzedDataProvider& fuzzed_data_provider, const size_t max_length, const bool maybe_p2wsh) noexcept
|
||||
CScript ConsumeScript(FuzzedDataProvider& fuzzed_data_provider, const std::optional<size_t>& max_length, const bool maybe_p2wsh) noexcept
|
||||
{
|
||||
const std::vector<uint8_t> b = ConsumeRandomLengthByteVector(fuzzed_data_provider, max_length);
|
||||
CScript r_script{b.begin(), b.end()};
|
||||
|
||||
Reference in New Issue
Block a user