Decoder: max uncompressed length for LZW must respect buffer byte length

Fixes #69.
This commit is contained in:
Andrew Champion committed 2020-02-09 18:24:22 +00:00
1 parent 119dec5068
commit 6e23274bea
1 file changed
+1 -1
+1 -1
View File
@@ -584,7 +584,7 @@ impl<R: Read + Seek> Decoder<R> {
let (bytes, reader) = LZWReader::new(
&mut self.reader,
usize::try_from(length)?,
max_uncompressed_length
max_uncompressed_length * buffer.byte_len()
)?;
(bytes, Box::new(reader))
}