-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tendermint: ensure ValidatorIndex is ≤ i32::MAX (#1411)
During conversion from usize to ValidatorIndex first convert the value to `i32` to make sure that the value is ≤ i32::MAX. Without that intermediate conversion, `u32::MAX as usize` is successfully converted into the index.
- Loading branch information
Showing
2 changed files
with
14 additions
and
3 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
.changelog/unreleased/improvements/1411-validator-index-i32-max-limit.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- `[tendermint]` Check `index ≤ i32::MAX` invariant when converting `usize` | ||
into `ValidatorIndex`. | ||
([\#1411](https://github.com/informalsystems/tendermint-rs/issues/1411)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters