2001.05.18 03:21 "libtiff on OSX?", by Ben Dubin-Thaler

2001.05.18 13:41 "A small fix", by Martí Maria

Hi,

ftp://ftp.remotesensing.org/pub/libtiff/tiff-v3.5.7-alpha2.tar.gz

Seeing you are testing a new release, here is a small patch. Without this modification, libtiff rejects broken tiffs where bytecount on strips are wrong. With this one, libtiff can recover from such situation.

file is tif_dirread.c

original code: -------------------------------------------------------

static int
TIFFFetchStripThing(TIFF* tif, TIFFDirEntry* dir, long nstrips, uint32** lpp)
{
 register uint32* lp;
 int status;

 if (!CheckDirCount(tif, dir, (uint32) nstrips))
                  return (0);

patched code ------------------------------------------------------

static int
TIFFFetchStripThing(TIFF* tif, TIFFDirEntry* dir, long nstrips, uint32** lpp)
{
 register uint32* lp;
 int status;

 if (!CheckDirCount(tif, dir, (uint32) nstrips))
          nstrips = dir -> tdir_count;

-------------------------------------------------------------------

This would not affect well behaved tiffs at all. At least on my testings it doesn't.

Regards,

Martí.