2017.03.04 10:59 "[Tiff] started seeing breakage with libtiff", by John

2017.03.04 12:10 "Re: [Tiff] started seeing breakage with libtiff", by Even Rouault

On samedi 4 mars 2017 10:59:05 CET jcupitt@gmail.com wrote:

Overnight I've started seeing problems with libtiff. It seems this patch has just been rolled out to Ubuntu:

http://bugzilla.maptools.org/show_bug.cgi?id=2590

This issues a warning if some tags are not NULL-terminated. However, libtiff itself can write tags which are not NULL-terminated, for example:

$ tiffcp -c jpeg k2a.tif x.tif

(where k2a.tif is an old uncompressed RGB strip tif I had handy) works fine. However I now can't read it back without a warning:

$ tiffcp x.tif y.tif

TIFFFetchNormalTag: Warning, ASCII value for tag "JPEGTables" does not end in null byte. Forcing it to be null.

JPEGLib: Warning, Premature end of JPEG file.

I'm unable to reproduce with CVS HEAD. The warning about JPEGTables is weird, since this not supposed to be an ASCII tag.

This causes problems for some other libraries, such as openslide, which seem to treat libtiff warnings as fatal.

Has anyone looked into this? What would be the best fix here? It looks like libtiff perhaps shouldn't check null-termination on JPEGTables.

--
Spatialys - Geospatial professional services
http://www.spatialys.com