aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2022-10-02 16:32:43 +0100
committerfanquake <fanquake@gmail.com>2022-10-02 16:37:40 +0100
commit93001b16a48361ed7fc0cd099c0d827f54e526e1 (patch)
treecc8bed7a505bab2ec3699d60ad19553185da6f0a /src
parent13ec2c1913db1c81a756bbe89450f3512c7efce6 (diff)
parentfa5752da6a58fadd3f79f47ff98b796d9768872a (diff)
Merge bitcoin/bitcoin#26216: fuzz: Limit outpoints.size in txorphan target to avoid OOM
fa5752da6a58fadd3f79f47ff98b796d9768872a fuzz: Limit outpoints.size in txorphan target to avoid OOM (MacroFake) Pull request description: Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52008 ACKs for top commit: fanquake: ACK fa5752da6a58fadd3f79f47ff98b796d9768872a Tree-SHA512: f010c0eabb72ad4bbf428954f6f978e88d6d15ec3ee77536334b11c0ca605377bdaa40ecf1984f027a430d62f05e9201775f5a6b047ffa38563aeefc04958a1f
Diffstat (limited to 'src')
-rw-r--r--src/test/fuzz/txorphan.cpp2
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 = [&] {