diff --git a/libtiff/tif_dirread.c b/libtiff/tif_dirread.c index c1d6c420..7796ebb4 100644 --- a/libtiff/tif_dirread.c +++ b/libtiff/tif_dirread.c @@ -1,4 +1,4 @@ -/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_dirread.c,v 1.5 2000-01-28 21:00:20 warmerda Exp $ */ +/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_dirread.c,v 1.6 2000-04-21 21:45:33 warmerda Exp $ */ /* * Copyright (c) 1988-1997 Sam Leffler @@ -506,7 +506,7 @@ TIFFReadDirectory(TIFF* tif) _TIFFFieldWithTag(tif,TIFFTAG_STRIPBYTECOUNTS)->field_name); EstimateStripByteCounts(tif, dir, dircount); #define BYTECOUNTLOOKSBAD \ - (td->td_stripbytecount[0] == 0 || \ + ((td->td_stripbytecount[0] == 0 && td->td_stripoffset[0] != 0) || \ (td->td_compression == COMPRESSION_NONE && \ td->td_stripbytecount[0] > TIFFGetFileSize(tif) - td->td_stripoffset[0])) } else if (td->td_nstrips == 1 && BYTECOUNTLOOKSBAD) {