From ca75b773c91ab6cee5ca5a9d7d15ae0053a79035 Mon Sep 17 00:00:00 2001 From: Su Laus Date: Mon, 6 May 2019 19:32:13 +0000 Subject: [PATCH] Reading error for FileSource and SceneType tags corrected. EXIF tags FILESOURCE and SCENETYPE are defined as TIFF_UNDEFINED and field_readcount==1! There is a bug in TIFFReadDirEntryByte() preventing to read correctly type TIFF_UNDEFINED fields with field_readcount==1 Upgrade of TIFFReadDirEntryByte() with added TIFF_UNDEFINED switch-entry allows libtiff to read those tags correctly. --- libtiff/tif_dirread.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libtiff/tif_dirread.c b/libtiff/tif_dirread.c index 1fdcb099..65675d0f 100644 --- a/libtiff/tif_dirread.c +++ b/libtiff/tif_dirread.c @@ -206,6 +206,7 @@ static enum TIFFReadDirEntryErr TIFFReadDirEntryByte(TIFF* tif, TIFFDirEntry* di switch (direntry->tdir_type) { case TIFF_BYTE: + case TIFF_UNDEFINED: /* Support to read TIFF_UNDEFINED with field_readcount==1 */ TIFFReadDirEntryCheckedByte(tif,direntry,value); return(TIFFReadDirEntryErrOk); case TIFF_SBYTE: