Received: from mailgate002.isp.belgacom.be (mailgate002.isp.belgacom.be [195.238.6.87])
	by maildelivery007.isp.belgacom.be (Postfix) with ESMTP id 691CF45C002
	for <joris.at.lebbeke@skynet.be>; Sat, 31 May 2008 17:52:57 +0200 (CEST)
Authentication-Results: in.mx.skynet.be; dkim=neutral (message not signed) header.i=none
Received: from r153.dmsolutions.ca (HELO duke.maptools.org) ([209.217.116.153])
  by in.mx.skynet.be with ESMTP; 31 May 2008 17:52:56 +0200
Received: from duke.maptools.org (duke.maptools.org [127.0.0.1])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id m4VFULIU015526;
	Sat, 31 May 2008 11:31:59 -0400
Received: from smtp4-g19.free.fr (smtp4-g19.free.fr [212.27.42.30])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id m4VFUIul015523
	for <tiff@lists.maptools.org>; Sat, 31 May 2008 11:30:19 -0400
Received: from smtp4-g19.free.fr (localhost.localdomain [127.0.0.1])
	by smtp4-g19.free.fr (Postfix) with ESMTP id 248793EA0AE;
	Sat, 31 May 2008 17:30:18 +0200 (CEST)
Received: from pc-amd64.local (mla78-3-88-162-84-61.fbx.proxad.net
	[88.162.84.61])
	by smtp4-g19.free.fr (Postfix) with ESMTP id 7FCD03EA0E6;
	Sat, 31 May 2008 17:30:17 +0200 (CEST)
From: Even Rouault <even.rouault@mines-paris.org>
To: Dan Greve <grevedan@hotmail.com>
Subject: Re: [Tiff] Re: [gdal-dev] Problem with libTiff on Solaris 10
Date: Sat, 31 May 2008 17:30:11 +0200
User-Agent: KMail/1.9.6 (enterprise 0.20070907.709405)
References: <BAY118-W48661A64DCC8F8DD5F1FD1C7BE0@phx.gbl>
	<BAY118-W5C69E4EF5781D91CBBCF2C7BE0@phx.gbl>
	<BAY118-W11CB08B2A6CDD18BE68BD6C7B90@phx.gbl>
In-Reply-To: <BAY118-W11CB08B2A6CDD18BE68BD6C7B90@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="utf-8"
Content-Disposition: inline
Message-Id: <200805311730.13070.even.rouault@mines-paris.org>
X-MIME-Autoconverted: from quoted-printable to 8bit by duke.maptools.org id
	m4VFUIul015523
Cc: gdal-dev@lists.osgeo.org, mailing list <tiff@lists.maptools.org>,
        tiff@lists.osgeo.org
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.4
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org
Content-Transfer-Encoding: quoted-printable
X-UIDL: 000000000023ceae.00002d39
X-MSP-STORE: Sat, 31 May 2008 17:52:57 +0200
Status:   

Dan,

Your fix is not the right one. But I recognize that my previous suggestio=
n=20
could lead into error.

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

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

Even

-------------------------------------------------------------------------=
----------

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

_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
