Skip to content

Commit b14db5a

Browse files
committed
Merge #14513: Avoid 1 << 31 (UB) in calculation of SEQUENCE_LOCKTIME_DISABLE_FLAG
bc60c61 Avoid 1 << 31 (UB) in calculation of SEQUENCE_LOCKTIME_DISABLE_FLAG (practicalswift) Pull request description: Avoid `1 << 31` (UB) in calculation of `SEQUENCE_LOCKTIME_DISABLE_FLAG`. Context: bitcoin/bitcoin#14510 (comment) Tree-SHA512: bdb4a913c6a82ff1a455ba67d3351f6408ff4116574329361644b483fea96b801fdc5c5659233856b591cd3a46ec669d3b5b438553e4240d7099c560eae2e2ae
2 parents 8010ded + bc60c61 commit b14db5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/primitives/transaction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class CTxIn
7373
/* Below flags apply in the context of BIP 68*/
7474
/* If this flag set, CTxIn::nSequence is NOT interpreted as a
7575
* relative lock-time. */
76-
static const uint32_t SEQUENCE_LOCKTIME_DISABLE_FLAG = (1 << 31);
76+
static const uint32_t SEQUENCE_LOCKTIME_DISABLE_FLAG = (1U << 31);
7777

7878
/* If CTxIn::nSequence encodes a relative lock-time and this flag
7979
* is set, the relative lock-time has units of 512 seconds,

0 commit comments

Comments
 (0)