Adjust previous fix to avoid undue warning in some situations triggered by GDAL
This commit is contained in:
parent
3db0ff91bc
commit
f5e1d765eb
@ -3909,10 +3909,17 @@ TIFFReadDirectory(TIFF* tif)
|
|||||||
case TIFF_LONG8:
|
case TIFF_LONG8:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
/* Warn except if directory typically created with TIFFDeferStrileArrayWriting() */
|
||||||
|
if( !(tif->tif_mode == O_RDWR &&
|
||||||
|
dp->tdir_count == 0 &&
|
||||||
|
dp->tdir_type == 0 &&
|
||||||
|
dp->tdir_offset.toff_long8 == 0) )
|
||||||
|
{
|
||||||
fip = TIFFFieldWithTag(tif,dp->tdir_tag);
|
fip = TIFFFieldWithTag(tif,dp->tdir_tag);
|
||||||
TIFFWarningExt(tif->tif_clientdata,module,
|
TIFFWarningExt(tif->tif_clientdata,module,
|
||||||
"Invalid data type for tag %s",
|
"Invalid data type for tag %s",
|
||||||
fip ? fip->field_name : "unknown tagname");
|
fip ? fip->field_name : "unknown tagname");
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
_TIFFmemcpy( &(tif->tif_dir.td_stripoffset_entry),
|
_TIFFmemcpy( &(tif->tif_dir.td_stripoffset_entry),
|
||||||
@ -3927,10 +3934,17 @@ TIFFReadDirectory(TIFF* tif)
|
|||||||
case TIFF_LONG8:
|
case TIFF_LONG8:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
/* Warn except if directory typically created with TIFFDeferStrileArrayWriting() */
|
||||||
|
if( !(tif->tif_mode == O_RDWR &&
|
||||||
|
dp->tdir_count == 0 &&
|
||||||
|
dp->tdir_type == 0 &&
|
||||||
|
dp->tdir_offset.toff_long8 == 0) )
|
||||||
|
{
|
||||||
fip = TIFFFieldWithTag(tif,dp->tdir_tag);
|
fip = TIFFFieldWithTag(tif,dp->tdir_tag);
|
||||||
TIFFWarningExt(tif->tif_clientdata,module,
|
TIFFWarningExt(tif->tif_clientdata,module,
|
||||||
"Invalid data type for tag %s",
|
"Invalid data type for tag %s",
|
||||||
fip ? fip->field_name : "unknown tagname");
|
fip ? fip->field_name : "unknown tagname");
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
_TIFFmemcpy( &(tif->tif_dir.td_stripbytecount_entry),
|
_TIFFmemcpy( &(tif->tif_dir.td_stripbytecount_entry),
|
||||||
|
Loading…
Reference in New Issue
Block a user