diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-09-27 12:39:17 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-11-01 12:25:29 +0100 |
commit | fa4baf0756c792630391ed456aaa15285ad6eb52 (patch) | |
tree | dbc5d78fbcbfb48cade2043c5cd6f9238205babe /src/test/fuzz/signature_checker.cpp | |
parent | 077e98c6c20609bff7ecf1c7c9cdb3f4b31bc139 (diff) |
fuzz: Rework ConsumeScript
This should make it easier for the fuzz engine to explore multisig code
paths. See discussion in https://github.com/bitcoin/bitcoin/issues/23105
The downside is that all fuzz inputs that use ConsumeScript are now
invalidated and need to be re-generated.
Another downside may be that most multisig scripts from ConsumeScript are
using likely not fully valid pubkeys.
Diffstat (limited to 'src/test/fuzz/signature_checker.cpp')
-rw-r--r-- | src/test/fuzz/signature_checker.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/fuzz/signature_checker.cpp b/src/test/fuzz/signature_checker.cpp index 6b86c8889d..c3f416632d 100644 --- a/src/test/fuzz/signature_checker.cpp +++ b/src/test/fuzz/signature_checker.cpp @@ -58,8 +58,8 @@ FUZZ_TARGET_INIT(signature_checker, initialize_signature_checker) FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size()); const unsigned int flags = fuzzed_data_provider.ConsumeIntegral<unsigned int>(); const SigVersion sig_version = fuzzed_data_provider.PickValueInArray({SigVersion::BASE, SigVersion::WITNESS_V0}); - const auto script_1 = ConsumeScript(fuzzed_data_provider, 65536); - const auto script_2 = ConsumeScript(fuzzed_data_provider, 65536); + const auto script_1{ConsumeScript(fuzzed_data_provider)}; + const auto script_2{ConsumeScript(fuzzed_data_provider)}; std::vector<std::vector<unsigned char>> stack; (void)EvalScript(stack, script_1, flags, FuzzedSignatureChecker(fuzzed_data_provider), sig_version, nullptr); if (!IsValidFlagCombination(flags)) { |