From 7b79cbd722d35b8113d5136b06d4a8e5fd569fc6 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Fri, 31 Jul 2015 18:05:42 +0200 Subject: limit total length of user agent comments Reworked-By: Wladimir J. van der Laan --- src/net.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/net.h') diff --git a/src/net.h b/src/net.h index 658f586b12..62f84bbe45 100644 --- a/src/net.h +++ b/src/net.h @@ -46,6 +46,8 @@ static const unsigned int MAX_INV_SZ = 50000; static const unsigned int MAX_ADDR_TO_SEND = 1000; /** Maximum length of incoming protocol messages (no message over 2 MiB is currently acceptable). */ static const unsigned int MAX_PROTOCOL_MESSAGE_LENGTH = 2 * 1024 * 1024; +/** Maximum length of strSubVer in `version` message */ +static const unsigned int MAX_SUBVERSION_LENGTH = 256; /** -listen default */ static const bool DEFAULT_LISTEN = true; /** -upnp default */ @@ -166,6 +168,9 @@ extern CCriticalSection cs_vAddedNodes; extern NodeId nLastNodeId; extern CCriticalSection cs_nLastNodeId; +/** Subversion as sent to the P2P network in `version` messages */ +extern std::string strSubVersion; + struct LocalServiceInfo { int nScore; int nPort; -- cgit v1.2.3