diff --git a/ledger/src/shred.rs b/ledger/src/shred.rs index 997b7bd3b6861b..6a5ade8b410bc4 100644 --- a/ledger/src/shred.rs +++ b/ledger/src/shred.rs @@ -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 {