2000.08.29 05:44 "multi page tiff problem", by Gaffer

I have a system running libtiff 3.5.5 under NT, just recently the system broke because of a slight change in the input tiff source from unisys.

i did a quick hack through my code, made sure it wasnt a problem caused by myself - then found that the second tiff page fails to read properly at this place in the tiff_read.c in TIFFillStrip:

        // screws up here ... ?
        if ( td->td_stripoffset[strip] + bytecount > tif->tif_size) {
   TIFFError(module,
      "%s: Read error on strip %lu; got %lu bytes, expected %lu",
       tif->tif_name,
       (u_long) strip,
       (u_long) tif->tif_size - td->td_stripoffset[strip],
       (u_long) bytecount);
   tif->tif_curstrip = NOSTRIP;
   return (0);
  }

it seems that the strip size is incorrect, so i did a quick search on google and i think i found somebody else with a similar problem:

http://www.remotesensing.org/lists/libtiff_archive/msg00067.html

as in his case, by image fails only on the second page, and works when read in image previewer, OnDemand Viewer, and kodak image viewer.

What i'd like to know, is this a libtiff bug, or more precisely, does libtiff fail to work around this bug (where other viewers work around it). Is there an easy fix to this problem, or will i have to go back to my clients and tell them that the source image is garbage and we cannot process it?

Any help would be appreciated guys, thanks in advance.

cheers