Add consistency check between StripOffsets and StripByteCounts
This commit is contained in:
1 parent
7a7d4f0305
commit
bc2055243a
1 file changed
+6
@@ -215,6 +215,12 @@ impl Image {
|
|||||||
.unwrap_or(height);
|
.unwrap_or(height);
|
||||||
strip_decoder = Some(StripDecodeState { rows_per_strip });
|
strip_decoder = Some(StripDecodeState { rows_per_strip });
|
||||||
tile_attributes = None;
|
tile_attributes = None;
|
||||||
|
|
||||||
|
if chunk_offsets.len() != chunk_bytes.len() {
|
||||||
|
return Err(TiffError::FormatError(
|
||||||
|
TiffFormatError::InconsistentSizesEncountered,
|
||||||
|
));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
(false, false, true, true) => {
|
(false, false, true, true) => {
|
||||||
chunk_type = ChunkType::Tile;
|
chunk_type = ChunkType::Tile;
|
||||||
|
|||||||
Reference in new issue
Block a user