From 407175e0c2bc797599ebd9c0a1f2ec89ad7af136 Mon Sep 17 00:00:00 2001 From: Jon Atack Date: Tue, 28 Jul 2020 10:47:07 +0200 Subject: 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 --- src/protocol.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/protocol.cpp') diff --git a/src/protocol.cpp b/src/protocol.cpp index c989aa390..1f2e62854 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) { -- cgit v1.2.3