Skip to content

Commit 42aa8a7

Browse files
committed
merge bitcoin#26216: Limit outpoints.size in txorphan target to avoid OOM
1 parent b376c09 commit 42aa8a7

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
@@ -49,7 +49,7 @@ FUZZ_TARGET(txorphan, .init = initialize_orphanage)
4949
// if true, allow duplicate input when constructing tx
5050
const bool duplicate_input = fuzzed_data_provider.ConsumeBool();
5151

52-
LIMITED_WHILE(fuzzed_data_provider.ConsumeBool(), 10 * DEFAULT_MAX_ORPHAN_TRANSACTIONS)
52+
LIMITED_WHILE(outpoints.size() < 200'000 && fuzzed_data_provider.ConsumeBool(), 10 * DEFAULT_MAX_ORPHAN_TRANSACTIONS)
5353
{
5454
// construct transaction
5555
const CTransactionRef tx = [&] {

0 commit comments

Comments
 (0)