net: Avoid UBSan warning in ProcessMessage(...)
This commit is contained in:
1 parent
f72d80b07a
commit
f5f2f97168
1 file changed
+3
@@ -2489,6 +2489,9 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
|
|||||||
bool fRelay = true;
|
bool fRelay = true;
|
||||||
|
|
||||||
vRecv >> nVersion >> nServiceInt >> nTime >> addrMe;
|
vRecv >> nVersion >> nServiceInt >> nTime >> addrMe;
|
||||||
|
if (nTime < 0) {
|
||||||
|
nTime = 0;
|
||||||
|
}
|
||||||
nServices = ServiceFlags(nServiceInt);
|
nServices = ServiceFlags(nServiceInt);
|
||||||
if (!pfrom.IsInboundConn())
|
if (!pfrom.IsInboundConn())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user