Skip to content

Commit 8f67116

Browse files
authored
fix: ignore ForwardTsnSupp when it is the last param
1 parent 7bf1438 commit 8f67116

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sctp/src/chunk/chunk_init.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ impl Chunk for ChunkInit {
169169
let mut params = vec![];
170170
let mut offset = CHUNK_HEADER_SIZE + INIT_CHUNK_MIN_LENGTH;
171171
let mut remaining = raw.len() as isize - offset as isize;
172-
while remaining > INIT_OPTIONAL_VAR_HEADER_LENGTH as isize {
172+
while remaining >= INIT_OPTIONAL_VAR_HEADER_LENGTH as isize {
173173
let p = build_param(&raw.slice(offset..CHUNK_HEADER_SIZE + header.value_length()))?;
174174
let p_len = PARAM_HEADER_LENGTH + p.value_length();
175175
let len_plus_padding = p_len + get_padding_size(p_len);

0 commit comments

Comments
 (0)