mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
fuzz: Limit p2p fuzz targets to MAX_PROTOCOL_MESSAGE_LENGTH
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user