diff --git a/tlsn/tlsn-core/src/substrings/proof.rs b/tlsn/tlsn-core/src/substrings/proof.rs index ec3e051ff5..f726631c8c 100644 --- a/tlsn/tlsn-core/src/substrings/proof.rs +++ b/tlsn/tlsn-core/src/substrings/proof.rs @@ -68,14 +68,14 @@ impl SubstringsProof { for comm in self.inclusion_proof.commitments().iter() { if comm.direction() == &Direction::Sent { for r in comm.ranges() { - if r.end >= header.sent_len() { + if r.end > header.sent_len() { return Err(Error::ValidationError); } } } else { // comm.direction() == &Direction::Received for r in comm.ranges() { - if r.end >= header.recv_len() { + if r.end > header.recv_len() { return Err(Error::ValidationError); } } diff --git a/tlsn/tlsn-core/src/transcript.rs b/tlsn/tlsn-core/src/transcript.rs index 3e0a977d28..0162f2940e 100644 --- a/tlsn/tlsn-core/src/transcript.rs +++ b/tlsn/tlsn-core/src/transcript.rs @@ -44,7 +44,7 @@ impl Transcript { let mut dst: Vec = Vec::new(); for r in ranges { - if r.end as usize >= self.data.len() { + if r.end as usize > self.data.len() { // range bounds must be within `src` length return Err(Error::InternalError); } else {