fixed bug with unterminated files, and strips per separation change
This commit is contained in:
parent
e0433eb06e
commit
c1282751c6
@ -1,3 +1,8 @@
|
||||
2000-08-14 Frank Warmerdam <warmerda@rommel.atlsci.com>
|
||||
|
||||
* tif_read.c: fixed up bug with files missing rowsperstrip and
|
||||
the strips per separation fix done a few weeks ago.
|
||||
|
||||
2000-07-17 Frank Warmerdam <warmerda@cs46980-c>
|
||||
|
||||
* Tentatively added support for SAMPLEFORMAT_COMPLEXIEEEFP, and
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_read.c,v 1.5 2000-07-12 19:20:52 warmerda Exp $ */
|
||||
/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_read.c,v 1.6 2000-08-14 16:21:54 warmerda Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988-1997 Sam Leffler
|
||||
@ -136,8 +136,12 @@ TIFFReadEncodedStrip(TIFF* tif, tstrip_t strip, tdata_t buf, tsize_t size)
|
||||
* rows in the strip (check for truncated last strip on any
|
||||
* of the separations).
|
||||
*/
|
||||
strips_per_sep = (td->td_imagelength+td->td_rowsperstrip-1)
|
||||
/ td->td_rowsperstrip;
|
||||
if( td->td_rowsperstrip >= td->td_imagelength )
|
||||
strips_per_sep = 1;
|
||||
else
|
||||
strips_per_sep = (td->td_imagelength+td->td_rowsperstrip-1)
|
||||
/ td->td_rowsperstrip;
|
||||
|
||||
sep_strip = strip % strips_per_sep;
|
||||
|
||||
if (sep_strip != strips_per_sep-1 ||
|
||||
|
Loading…
Reference in New Issue
Block a user