Fix message ack bound check

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
This commit is contained in:
Lee Smet committed 2026-03-27 11:14:23 +01:00
1 parent 6a4f51555b
commit de2e90a371
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
duplicates to peers.
- Make sure the configuration for Quic connections is the same for outbound and
inbound connections.
- Fix bound check on message ACK.
## [0.7.4] - 2026-03-23
+1 -1
View File
@@ -359,7 +359,7 @@ where
let mc = MessageChunk::new(mp);
// Sanity checks. This is just to protect ourselves, if the other party is
// malicious it can return any data it wants here.
if mc.chunk_idx() > message.chunks.len() as u64 {
if mc.chunk_idx() >= message.chunks.len() as u64 {
debug!("Dropping CHUNK ACK for message because ACK'ed chunk is out of bounds");
return;
}