Skip to content

Commit

Permalink
net: Avoid UBSan warning in ProcessMessage(...)
Browse files Browse the repository at this point in the history
  • Loading branch information
practicalswift committed Jan 31, 2021
1 parent 4c55f92 commit 2a241c3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/net_processing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
{
Expand Down

0 comments on commit 2a241c3

Please sign in to comment.