2011.04.18 17:42 "[Tiff] WhiteLevel with 3.9.5", by Ashish Uthama

2011.04.19 15:46 "Re: [Tiff] WhiteLevel with 3.9.5", by Edward Lam

On 4/18/2011 1:42 PM, Ashish Uthama wrote:

I am trying to use the 3.9.5 library to handle a DNG file with a subIFD. The subIFD has a WhiteLevel tag http://www.awaresystems.be/imaging/tiff/tifftags/whitelevel.html which appears to cause a segfault with 3.9.5 (Used to work fine with 3.7.1).

Debugging 3.9.5, I noticed that TIFFSetField at 1739 was called for this tag:

tif_dirread.c:

   1737                           ok = (fip->field_passcount ?
   1738                               TIFFSetField(tif, dp->tdir_tag, 1,

&v32)

   1739                             : TIFFSetField(tif, dp->tdir_tag, v32));

which cases the memcpy in 506 to fail:

tif_dir.c:

Line 1737 seems like it is in the code path for a singleton value for that tag. So this suggests that you should have a SamplesPerPixel value of 1? I'd double-check that. Note that this behaviour change might have been as a result of http://bugzilla.maptools.org/show_bug.cgi?id=1963 being fixed.

Regards,

-Edward