From 0a8245b7b81e4b2cf9841b81c6fcc252b8fe6162 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Tue, 7 Jan 2020 23:13:11 +0100 Subject: OJPEGReadHeaderInfo: if rowsperstrip not defined, then assume one-single-strip. Complementary fix to 0356ea76bac908c61160d735f078437ace953bd3 --- libtiff/tif_ojpeg.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libtiff/tif_ojpeg.c b/libtiff/tif_ojpeg.c index d6f7d97e..aa5ff5e2 100644 --- a/libtiff/tif_ojpeg.c +++ b/libtiff/tif_ojpeg.c @@ -1064,6 +1064,8 @@ OJPEGReadHeaderInfo(TIFF* tif) { sp->strile_width=sp->image_width; sp->strile_length=tif->tif_dir.td_rowsperstrip; + if( sp->strile_length == (uint32)-1 ) + sp->strile_length = sp->image_length; sp->strile_length_total=sp->image_length; } if (tif->tif_dir.td_samplesperpixel==1) -- cgit v1.2.1