0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-08 10:31:50 -05:00

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

This commit is contained in:
practicalswift 2021-01-31 21:03:05 +00:00
parent f72d80b07a
commit f5f2f97168

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())
{