Skip to content

Commit fa5752d

Browse files
author
MacroFake
committed
fuzz: Limit outpoints.size in txorphan target to avoid OOM
1 parent 9f65006 commit fa5752d

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)