diff --git a/src/net_processing.cpp b/src/net_processing.cpp index a8a14a359f..585bfc902d 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -1443,9 +1443,9 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr if (!vRecv.empty()) { vRecv >> LIMITED_STRING(strSubVer, MAX_SUBVERSION_LENGTH); cleanSubVer = SanitizeString(strSubVer); - int parsedVersion[4]; + int parsedVersion[4] = {0, 0, 0, 0}; if (sscanf(cleanSubVer.c_str(), "/Satoshi:%2d.%2d.%2d.%2d/", - &parsedVersion[0], &parsedVersion[1], &parsedVersion[2], &parsedVersion[3]) == 4) { + &parsedVersion[0], &parsedVersion[1], &parsedVersion[2], &parsedVersion[3]) >= 2) { int peerClientVersion = parsedVersion[0]*1000000 + parsedVersion[1]*10000 + parsedVersion[2]*100 + parsedVersion[3]; if (peerClientVersion < MIN_FIRO_CLIENT_VERSION) { connman.PushMessage(pfrom, CNetMsgMaker(INIT_PROTO_VERSION).Make(NetMsgType::REJECT, strCommand, REJECT_OBSOLETE, "This version is banned from the network"));