Skip to content

Commit

Permalink
check in decoder if a sequence section with 0 sequences contains noth…
Browse files Browse the repository at this point in the history
…ing else
  • Loading branch information
KillingSpark committed Oct 17, 2024
1 parent 689a0ff commit 4f5c094
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/decoding/block_decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,9 @@ impl BlockDecoder {
vprintln!("Executing sequences");
execute_sequences(workspace)?;
} else {
if !raw.is_empty() {
return Err(DecompressBlockError::DecodeSequenceError(DecodeSequenceError::ExtraBits { bits_remaining: raw.len() as isize * 8 }));
}
workspace.buffer.push(&workspace.literals_buffer);
workspace.sequences.clear();
}
Expand Down

0 comments on commit 4f5c094

Please sign in to comment.