net: Avoid UBSan warning in ProcessMessage(...)

This commit is contained in:
practicalswift committed 2021-02-02 08:43:19 +00:00
1 parent f72d80b07a
commit f5f2f97168
1 file changed
+3
+3
View File
@@ -2489,6 +2489,9 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
bool fRelay = true;
vRecv >> nVersion >> nServiceInt >> nTime >> addrMe;
if (nTime < 0) {
nTime = 0;
}
nServices = ServiceFlags(nServiceInt);
if (!pfrom.IsInboundConn())
{