Skip to content

Commit bc60c61

Browse files
Avoid 1 << 31 (UB) in calculation of SEQUENCE_LOCKTIME_DISABLE_FLAG
1 parent 3036faf commit bc60c61

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)