diff options
Diffstat (limited to 'src/test/fuzz/data_stream.cpp')
-rw-r--r-- | src/test/fuzz/data_stream.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/test/fuzz/data_stream.cpp b/src/test/fuzz/data_stream.cpp index 8178878c30..323090e041 100644 --- a/src/test/fuzz/data_stream.cpp +++ b/src/test/fuzz/data_stream.cpp @@ -2,6 +2,7 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#include <addrdb.h> #include <addrman.h> #include <net.h> #include <test/fuzz/FuzzedDataProvider.h> @@ -22,5 +23,8 @@ FUZZ_TARGET_INIT(data_stream_addr_man, initialize_data_stream_addr_man) FuzzedDataProvider fuzzed_data_provider{buffer.data(), buffer.size()}; CDataStream data_stream = ConsumeDataStream(fuzzed_data_provider); CAddrMan addr_man(/* asmap */ std::vector<bool>(), /* deterministic */ false, /* consistency_check_ratio */ 0); - CAddrDB::Read(addr_man, data_stream); + try { + ReadFromStream(addr_man, data_stream); + } catch (const std::exception&) { + } } |