From fa5752da6a58fadd3f79f47ff98b796d9768872a Mon Sep 17 00:00:00 2001 From: MacroFake Date: Fri, 30 Sep 2022 17:00:11 +0200 Subject: fuzz: Limit outpoints.size in txorphan target to avoid OOM --- src/test/fuzz/txorphan.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/test/fuzz') 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 = [&] { -- cgit v1.2.3