Reachable abort in tiff2ps, Assertion `fip->field_readcount == TIFF_VARIABLE2' failed
Summary
There is a reachable abort using tiff2ps that causes "assertion `fip->field_readcount == TIFF_VARIABLE2' failed". I think it is also related to issue #559 (closed).
Version
newest commit a0a18437
Steps to reproduce
Run
tiff2ps Input
tiff2ps_abort_TIFFFetchNormalTag
Here is the trace reported by valgrind:
==139348== Process terminating with default action of signal 6 (SIGABRT)
==139348== at 0x5A1B438: raise (raise.c:54)
==139348== by 0x5A1D039: abort (abort.c:89)
==139348== by 0x5A13BE6: __assert_fail_base (assert.c:92)
==139348== by 0x5A13C91: __assert_fail (assert.c:101)
==139348== by 0x48D270: TIFFFetchNormalTag (tif_dirread.c:6896)
==139348== by 0x49AE4F: TIFFReadDirectory (tif_dirread.c:4617)
==139348== by 0x4AD317: TIFFClientOpenExt (tif_open.c:629)
==139348== by 0x4CE88A: TIFFFdOpenExt (tif_unix.c:209)
==139348== by 0x4CE88A: TIFFOpenExt (tif_unix.c:255)
==139348== by 0x4087FD: main (tiff2ps.c:524)
Platform
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.5 LTS"
(Operating system, architecture, compiler details)