Skip to content

Commit e4899e4

Browse files
committed
Amendment: truncate rowsperstrip to height so we don't over-allocate
Signed-off-by: Larry Gritz <lg@larrygritz.com>
1 parent 0dc2bc4 commit e4899e4

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/tiff.imageio/tiffinput.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1312,6 +1312,7 @@ TIFFInput::readspec(bool read_meta)
13121312
if (m_rowsperstrip > 0) {
13131313
// Only set the attrib if a legit value was found in the file
13141314
m_spec.attribute("tiff:RowsPerStrip", m_rowsperstrip);
1315+
m_rowsperstrip = std::min(m_rowsperstrip, m_spec.height);
13151316
} else {
13161317
// Default if not found is "one strip for the whole image"
13171318
m_rowsperstrip = m_spec.height;

0 commit comments

Comments
 (0)