diff options
author | MacroFake <falke.marco@gmail.com> | 2022-09-30 17:00:11 +0200 |
---|---|---|
committer | MacroFake <falke.marco@gmail.com> | 2022-09-30 16:52:01 +0200 |
commit | fa5752da6a58fadd3f79f47ff98b796d9768872a (patch) | |
tree | 4a15670134199702896c78f6b5e1d37e9e36b33c /src/test/fuzz/txorphan.cpp | |
parent | 9f650062fc4350d8c50ac8890cddd4d99f20f895 (diff) | |
download | bitcoin-fa5752da6a58fadd3f79f47ff98b796d9768872a.tar.xz |
fuzz: Limit outpoints.size in txorphan target to avoid OOM
Diffstat (limited to 'src/test/fuzz/txorphan.cpp')
-rw-r--r-- | src/test/fuzz/txorphan.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/fuzz/txorphan.cpp b/src/test/fuzz/txorphan.cpp index 943f3f5fdf..55060f31cf 100644 --- a/src/test/fuzz/txorphan.cpp +++ b/src/test/fuzz/txorphan.cpp @@ -45,7 +45,7 @@ FUZZ_TARGET_INIT(txorphan, initialize_orphanage) // if true, allow duplicate input when constructing tx const bool duplicate_input = fuzzed_data_provider.ConsumeBool(); - LIMITED_WHILE(fuzzed_data_provider.ConsumeBool(), 10 * DEFAULT_MAX_ORPHAN_TRANSACTIONS) + LIMITED_WHILE(outpoints.size() < 200'000 && fuzzed_data_provider.ConsumeBool(), 10 * DEFAULT_MAX_ORPHAN_TRANSACTIONS) { // construct transaction const CTransactionRef tx = [&] { |