fuzz: Limit p2p fuzz targets to MAX_PROTOCOL_MESSAGE_LENGTH

This commit is contained in:
MarcoFalke
2023-12-14 12:40:17 +01:00
parent 9f0f83d650
commit fa769d3e41
2 changed files with 3 additions and 11 deletions

View File

@@ -16,7 +16,6 @@
#include <test/util/net.h>
#include <test/util/setup_common.h>
#include <test/util/validation.h>
#include <util/chaintype.h>
#include <util/time.h>
#include <validationinterface.h>
@@ -72,7 +71,7 @@ FUZZ_TARGET(process_messages, .init = initialize_process_messages)
CSerializedNetMsg net_msg;
net_msg.m_type = random_message_type;
net_msg.data = ConsumeRandomLengthByteVector(fuzzed_data_provider);
net_msg.data = ConsumeRandomLengthByteVector(fuzzed_data_provider, MAX_PROTOCOL_MESSAGE_LENGTH);
CNode& random_node = *PickValue(fuzzed_data_provider, peers);