diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2021-01-31 21:03:05 +0000 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2021-02-02 08:43:19 +0000 |
commit | f5f2f9716885e7548809e77f46b493c896a019bf (patch) | |
tree | 04084cc2f6f5e40864c73e5a351892e85c52cf4c /src/net_processing.cpp | |
parent | f72d80b07af8ecbb2f9df1e87344eb465186f19d (diff) |
net: Avoid UBSan warning in ProcessMessage(...)
Diffstat (limited to 'src/net_processing.cpp')
-rw-r--r-- | src/net_processing.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp index b68453759a..8936b8109d 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -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()) { |