Skip to content

Commit 93001b1

Browse files
committed
Merge bitcoin/bitcoin#26216: fuzz: Limit outpoints.size in txorphan target to avoid OOM
fa5752d 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 fa5752d Tree-SHA512: f010c0eabb72ad4bbf428954f6f978e88d6d15ec3ee77536334b11c0ca605377bdaa40ecf1984f027a430d62f05e9201775f5a6b047ffa38563aeefc04958a1f
2 parents 13ec2c1 + fa5752d commit 93001b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/fuzz/txorphan.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ FUZZ_TARGET_INIT(txorphan, initialize_orphanage)
4545
// if true, allow duplicate input when constructing tx
4646
const bool duplicate_input = fuzzed_data_provider.ConsumeBool();
4747

48-
LIMITED_WHILE(fuzzed_data_provider.ConsumeBool(), 10 * DEFAULT_MAX_ORPHAN_TRANSACTIONS)
48+
LIMITED_WHILE(outpoints.size() < 200'000 && fuzzed_data_provider.ConsumeBool(), 10 * DEFAULT_MAX_ORPHAN_TRANSACTIONS)
4949
{
5050
// construct transaction
5151
const CTransactionRef tx = [&] {

0 commit comments

Comments
 (0)