diff --git a/ChangeLog b/ChangeLog index 194c89ab..3a394270 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-12-12 Lee Howard + + * libtiff/tif_dirread.c: fix for Zeiss LSM and Canon CR2 files + http://bugzilla.maptools.org/show_bug.cgi?id=2164 + 2010-12-11 Lee Howard * tools/tiff2pdf.c: remove invalid duplication for Lab diff --git a/libtiff/tif_dirread.c b/libtiff/tif_dirread.c index 986cc0a1..2229cb3a 100644 --- a/libtiff/tif_dirread.c +++ b/libtiff/tif_dirread.c @@ -1,4 +1,4 @@ -/* $Id: tif_dirread.c,v 1.162 2010-12-11 23:22:07 faxguy Exp $ */ +/* $Id: tif_dirread.c,v 1.163 2010-12-13 05:15:50 faxguy Exp $ */ /* * Copyright (c) 1988-1997 Sam Leffler @@ -2727,7 +2727,7 @@ static enum TIFFReadDirEntryErr TIFFReadDirEntryPersampleShort(TIFF* tif, TIFFDi uint16* m; uint16* na; uint16 nb; - if (direntry->tdir_count!=(uint64)tif->tif_dir.td_samplesperpixel) + if (direntry->tdir_count<(uint64)tif->tif_dir.td_samplesperpixel) return(TIFFReadDirEntryErrCount); err=TIFFReadDirEntryShortArray(tif,direntry,&m); if (err!=TIFFReadDirEntryErrOk) @@ -2755,7 +2755,7 @@ static enum TIFFReadDirEntryErr TIFFReadDirEntryPersampleDouble(TIFF* tif, TIFFD double* m; double* na; uint16 nb; - if (direntry->tdir_count!=(uint64)tif->tif_dir.td_samplesperpixel) + if (direntry->tdir_count<(uint64)tif->tif_dir.td_samplesperpixel) return(TIFFReadDirEntryErrCount); err=TIFFReadDirEntryDoubleArray(tif,direntry,&m); if (err!=TIFFReadDirEntryErrOk)