aboutsummaryrefslogtreecommitdiff
path: root/src/protocol.cpp
diff options
context:
space:
mode:
authorJon Atack <jon@atack.com>2020-07-28 10:47:07 +0200
committerJon Atack <jon@atack.com>2020-08-27 10:57:20 +0200
commit407175e0c2bc797599ebd9c0a1f2ec89ad7af136 (patch)
tree0596e5fc557db4c9f2ef296f429d453750d79989 /src/protocol.cpp
parent2562d5d23863b6ef6cbdd9c34db5e485d9dc8406 (diff)
downloadbitcoin-407175e0c2bc797599ebd9c0a1f2ec89ad7af136.tar.xz
p2p: change CInv::type from int to uint32_t
fixes issue #19678 UBSan implicit-integer-sign-change Credit to Eugene (Crypt-iQ) for finding and reporting the issue and to Vasil Dimov (vasild) for the original suggestion
Diffstat (limited to 'src/protocol.cpp')
-rw-r--r--src/protocol.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/protocol.cpp b/src/protocol.cpp
index c989aa3902..1f2e628545 100644
--- a/src/protocol.cpp
+++ b/src/protocol.cpp
@@ -163,7 +163,7 @@ CInv::CInv()
hash.SetNull();
}
-CInv::CInv(int typeIn, const uint256& hashIn) : type(typeIn), hash(hashIn) {}
+CInv::CInv(uint32_t typeIn, const uint256& hashIn) : type(typeIn), hash(hashIn) {}
bool operator<(const CInv& a, const CInv& b)
{