2015.04.02 20:22 "[Tiff] problem reading directories past 2GB on a 64bits system", by Romain Franconville

2015.04.02 20:53 "Re: [Tiff] problem reading directories past 2GB on a 64bits system", by Bob Friesenhahn

I'm using libtiff 4.0-3 on Ubuntu (64bits) 14.04.

I'm trying to read tiff files that are signed 16bits. Everything run smoothly for files smaller than 2Gb. But I cannot access directories past that limit.

TIFFSetDirectory returns the following error in those cases:

     TIFFFetchDirectory: Sanity check on directory count failed, zero tag
directories not supported.
Failed to read directory at offset 256.      TIFFReadDirectory:

Opening as bigtiff doesn't make a difference (expected since it's still less than 4Gb).

> Any ideas of what might be going on ? 

It sounds like there is integer overflow in this directory count sanity check code.

Bob
--
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/