AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2011.04.18 17:42 "[Tiff] WhiteLevel with 3.9.5", by Ashish Uthama
2011.04.19 12:47 "[Tiff] WhiteLevel with 3.9.5", by Ashish Uthama
2011.04.19 13:51 "[Tiff] WhiteLevel with 3.9.5", by Ashish Uthama
2011.04.19 14:27 "Re: [Tiff] WhiteLevel with 3.9.5", by Olivier Paquet
2011.04.19 15:19 "Re: [Tiff] WhiteLevel with 3.9.5", by Edward Lam
2011.04.19 15:35 "Re: [Tiff] WhiteLevel with 3.9.5", by Edward Lam
2011.04.19 15:46 "Re: [Tiff] WhiteLevel with 3.9.5", by Edward Lam
2011.04.21 13:02 "Re: [Tiff] WhiteLevel with 3.9.5", by Ashish Uthama
2011.04.24 13:50 "Re: [Tiff] WhiteLevel with 3.9.5", by Edward Lam
2011.04.25 20:40 "Re: [Tiff] WhiteLevel with 3.9.5", by Edward Lam
2011.05.06 14:16 "Re: [Tiff] WhiteLevel with 3.9.5", by

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