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);
|
||||
strip_decoder = Some(StripDecodeState { rows_per_strip });
|
||||
tile_attributes = None;
|
||||
|
||||
if chunk_offsets.len() != chunk_bytes.len() {
|
||||
return Err(TiffError::FormatError(
|
||||
TiffFormatError::InconsistentSizesEncountered,
|
||||
));
|
||||
}
|
||||
}
|
||||
(false, false, true, true) => {
|
||||
chunk_type = ChunkType::Tile;
|
||||
|
||||
Reference in new issue
Block a user