Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0ed3d90f19 |
No files matched your search
@@ -4,3 +4,8 @@ rust:
|
|||||||
- stable
|
- stable
|
||||||
- beta
|
- beta
|
||||||
- nightly
|
- nightly
|
||||||
|
|
||||||
|
script:
|
||||||
|
- if [[ "$TRAVIS_RUST_VERSION" == *stable* ]]; then rustup component add rustfmt; cargo fmt --version; cargo fmt -- --check || (echo "Please reformat your code with 'cargo fmt' (version $(cargo fmt --version))"; false); fi
|
||||||
|
- cargo build -v
|
||||||
|
- cargo test -v
|
||||||
@@ -1,12 +1,3 @@
|
|||||||
# Version 0.5.0
|
|
||||||
|
|
||||||
* Added support for 32-bit and 64-bit decoded values.
|
|
||||||
* Added CMYK(16|32|64) color type support.
|
|
||||||
* Check many internal integer conversions to increase stability. This should
|
|
||||||
only lead to images being reported as faulty that would previously silently
|
|
||||||
break platform limits. If there are any false positives, please report them.
|
|
||||||
* Remove an erroneous check of decoded length in lzw compressed images.
|
|
||||||
|
|
||||||
# Version 0.4.0
|
# Version 0.4.0
|
||||||
|
|
||||||
* Several enumerations are now non_exhaustive for future extensions.
|
* Several enumerations are now non_exhaustive for future extensions.
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "tiff"
|
name = "tiff"
|
||||||
version = "0.5.0"
|
version = "0.4.0"
|
||||||
authors = [
|
authors = [
|
||||||
"ccgn",
|
"ccgn",
|
||||||
"bvssvni <bvssvni@gmail.com>",
|
"bvssvni <bvssvni@gmail.com>",
|
||||||
|
|||||||
+2
-2
@@ -584,7 +584,7 @@ impl<R: Read + Seek> Decoder<R> {
|
|||||||
let (bytes, reader) = LZWReader::new(
|
let (bytes, reader) = LZWReader::new(
|
||||||
&mut self.reader,
|
&mut self.reader,
|
||||||
usize::try_from(length)?,
|
usize::try_from(length)?,
|
||||||
max_uncompressed_length * buffer.byte_len()
|
max_uncompressed_length
|
||||||
)?;
|
)?;
|
||||||
(bytes, Box::new(reader))
|
(bytes, Box::new(reader))
|
||||||
}
|
}
|
||||||
@@ -744,7 +744,7 @@ impl<R: Read + Seek> Decoder<R> {
|
|||||||
|
|
||||||
let buffer_size = usize::try_from(self.width)? * strip_height * self.bits_per_sample.len();
|
let buffer_size = usize::try_from(self.width)? * strip_height * self.bits_per_sample.len();
|
||||||
|
|
||||||
if buffer.len() < buffer_size {
|
if buffer.len() < buffer_size || usize::try_from(byte_count)? / buffer.byte_len() > buffer_size {
|
||||||
return Err(TiffError::FormatError(
|
return Err(TiffError::FormatError(
|
||||||
TiffFormatError::InconsistentSizesEncountered,
|
TiffFormatError::InconsistentSizesEncountered,
|
||||||
));
|
));
|
||||||
|
|||||||
@@ -149,12 +149,6 @@ fn test_decode_data() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn issue_69() {
|
|
||||||
test_image_sum_u16("issue_69_lzw.tiff", ColorType::Gray(16), 1015486);
|
|
||||||
test_image_sum_u16("issue_69_packbits.tiff", ColorType::Gray(16), 1015486);
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: GrayA support
|
// TODO: GrayA support
|
||||||
//#[test]
|
//#[test]
|
||||||
//fn test_gray_alpha_u8()
|
//fn test_gray_alpha_u8()
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in new issue
Block a user