Compare commits

..
Author SHA1 Message Date
Atul Bhosale 0ed3d90f19 Add cargo fmt to travis build config 2020-03-18 23:29:36 +05:30
7 changed files with 8 additions and 18 deletions

No files matched your search

+5
View File
@@ -4,3 +4,8 @@ rust:
- stable
- beta
- 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
-9
View File
@@ -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
* Several enumerations are now non_exhaustive for future extensions.
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "tiff"
version = "0.5.0"
version = "0.4.0"
authors = [
"ccgn",
"bvssvni <bvssvni@gmail.com>",
+2 -2
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 * buffer.byte_len()
max_uncompressed_length
)?;
(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();
if buffer.len() < buffer_size {
if buffer.len() < buffer_size || usize::try_from(byte_count)? / buffer.byte_len() > buffer_size {
return Err(TiffError::FormatError(
TiffFormatError::InconsistentSizesEncountered,
));
-6
View File
@@ -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
//#[test]
//fn test_gray_alpha_u8()
Binary file not shown.
Binary file not shown.