[Tiff] Re: [gdal-dev] Problem with libTiff on Solaris 10

Even Rouault even.rouault at mines-paris.org
Sat May 31 11:30:11 EDT 2008


Dan,

Your fix is not the right one. But I recognize that my previous suggestion 
could lead into error.

In fact, tdir_count field is a uint64 in libtiff 4.0.
So the correct fix is :

uint32 nTemp = (uint32)o->tdir_count;
_Tiffmemcpy(n, &nTemp, 4);

Even

-----------------------------------------------------------------------------------

RE: [Tiff] Re: [gdal-dev] Problem with libTiff on Solaris 10
De : 
Dan Greve <grevedan at hotmail.com>
  À : 
Bob Friesenhahn <bfriesen at simple.dallas.tx.us>, Even Rouault 
<even.rouault at mines-paris.org>
  CC : 
gdal-dev at lists.osgeo.org, tiff at lists.osgeo.org, Andy Cave 
<andy.cave at hamillroad.com>, mailing list <tiff at lists.maptools.org>
  Date : 
Aujourd'hui 16:49:15
   
Sure enough, the pointer n is not null, and throws a sigsegv fault. Aftern 
changing from
 
*(uint32*)n=(uint32)o->tdir_count;            TO
 
_TIFFmemcpy(n, &o->tdir_count, 4)
 
The execution passes this point, but where as *(uint32*)n should be 1, it is 
0. This causes errors later in the GDALOpen call on the tiff dataset, which 
fails with error "TiffFetchNormalTag:incorrect count for "SamplesPerPixel". 
debugging continues....
 
-- Dan Greve
-- Software Engineering
-- Northrop Grumman Corp.


More information about the gdal-dev mailing list