Skip to content

Commit

Permalink
patches range check in get_signed_message_range (backport #27822) (#2…
Browse files Browse the repository at this point in the history
…7831)

* patches range check in shred::layout::get_signed_message_range (#27822)

(cherry picked from commit b183e00)

# Conflicts:
#	ledger/src/shred.rs

* removes mergify merge conflicts

Co-authored-by: behzad nouri <[email protected]>
  • Loading branch information
mergify[bot] and behzadnouri authored Sep 16, 2022
1 parent c3182e1 commit 25ce9a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ledger/src/shred.rs
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ pub mod layout {
merkle::ShredData::get_signed_message_range(proof_size)?
}
};
(shred.len() <= range.end).then(|| range)
(range.end <= shred.len()).then(|| range)
}

pub(crate) fn get_reference_tick(shred: &[u8]) -> Result<u8, Error> {
Expand Down

0 comments on commit 25ce9a7

Please sign in to comment.