Return-Path: <tiff-bounces@lists.maptools.org>
Received: from inas003.isp.belgacom.be (localhost [127.0.0.1])
        by inav004.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AV-3.00) with ESMTP id k04DdkH2000968
        for <joris.at.lebbeke@skynet.be>; Wed, 4 Jan 2006 14:39:47 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from inmx019.isp.belgacom.be (inmx019.isp.belgacom.be [195.238.5.138])
        by inas003.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AS-2.03) with ESMTP id k04DdclL005562
        for <joris.at.lebbeke@skynet.be>; Wed, 4 Jan 2006 14:39:39 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153] (may be forged))
        by inmx019.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id k04DdUBp018173
        for <joris.at.lebbeke@skynet.be>; Wed, 4 Jan 2006 14:39:31 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
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 k04DXnHO032356;
	Wed, 4 Jan 2006 08:34:29 -0500
Received: from cgp.spb.edu (vlan3.cgp.spb.edu [195.70.196.207])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id k04DXkBl032353
	for <tiff@lists.maptools.org>; Wed, 4 Jan 2006 08:33:47 -0500
Received: from wg.pu.ru ([193.124.85.219] verified)
	by cgp.spb.edu (CommuniGate Pro SMTP 5.0.6)
	with ESMTP id 19062837 for tiff@lists.maptools.org;
	Wed, 04 Jan 2006 16:32:42 +0300
Received: (from uucp@localhost)
	by wg.pu.ru (8.9.1a/8.9.1) with UUCP id NAA08445
	for tiff@lists.maptools.org; Wed, 4 Jan 2006 13:33:50 GMT
Received: from ak4719.spb.edu (localhost [127.0.0.1])
	by ak4719.spb.edu (8.13.5/8.13.5/Debian-3) with ESMTP id k04DNo7v018787
	for <tiff@lists.maptools.org>; Wed, 4 Jan 2006 16:23:50 +0300
Received: (from dron@localhost)
	by ak4719.spb.edu (8.13.5/8.13.5/Submit) id k04DNogI018783
	for tiff@lists.maptools.org; Wed, 4 Jan 2006 16:23:50 +0300
From: Andrey Kiselev <dron@ak4719.spb.edu>
Date: Wed, 4 Jan 2006 16:23:50 +0300
To: tiff@lists.maptools.org
Subject: Re: [Tiff] Outrageous profile tag sizes reported by libtiff 3.8.0
Message-ID: <20060104132350.GA13687@ak4719.spb.edu>
Mail-Followup-To: tiff@lists.maptools.org
References: <Pine.SOC.4.60.0601011041320.4804@blade.simplesystems.org>
	<Pine.SOC.4.60.0601011137160.4804@blade.simplesystems.org>
	<Pine.SOC.4.60.0601011240590.4804@blade.simplesystems.org>
	<Pine.SOC.4.60.0601011453380.4804@blade.simplesystems.org>
	<Pine.SOC.4.60.0601020957350.4804@blade.simplesystems.org>
	<20060102192757.0616925048.qww314159@soup.q.ql.org>
	<Pine.SOC.4.60.0601022023230.4804@blade.simplesystems.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <Pine.SOC.4.60.0601022023230.4804@blade.simplesystems.org>
X-GnuPG-Key: http://www.srces.spb.org/dron/export.home.key
X-Face: "t+se9s~+y~[XUH]L|pmeO3Pt/Q@DNv**S, d@_1-C=}/,
	c%<3Qp]eu!ok<"2lYJm$!9qVcg F?7o*L; |$`6|Q|>Rt-cU%2_y@6tQ|`!Li}TsvZvEKx;
	>fuY=fc(=sX^`7Wmw8%SsR`AvM$a; 0U/eN\ P?B\FTyqD, 0np$U2!*'z_4D,
	VPlFf?bN0&zYf"zF0s!7Tl7?$we)xD0@lL>[h|8bhys0i.g|zLnu@C
	Ti@d]i=[!:j1CB\5/TF[m]`lfHfaqSN[0qn@T3zeosV/[LAss{@p_?],x*j8P_9t[}uHD^X-;
	j~\M! gyTly;fj`}&Y~i{<#bN.#QmkE}#T`dxP.I1\.)_MEN{@#W
User-Agent: Mutt/1.5.11
X-Virus-Scanned: ClamAV version 0.87.1, clamav-milter version 0.87 on ak4719
X-Virus-Status: Clean
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
X-UIDL: 000000000023ceae.000010c6
X-MSP-STORE: Wed, 04 Jan 2006 14:39:57 +0100
Status:   

On Mon, Jan 02, 2006 at 08:31:28PM -0600, Bob Friesenhahn wrote:
> >>A bit of testing shows that previously the third parameter of
> >>TIFFGetField() was of type uint32 when retrieving TIFFTAG_ICCPROFILE,
> >>TIFFTAG_PHOTOSHOP, TIFFTAG_RICHTIFFIPTC, TIFFTAG_XMLPACKET, but in
> >>3.8.0 the size is a uint16.  Unfortunately this interface is not fully
> >>defined by a header file since it is based on a variable argument
> >>list.  Libtiff 3.8.0 is *not* binary compatible with previous
> >>releases.
> >
> >For such a small change, I would vote for reverting it rather than
> >introducing a binary incompatibility.  Library ABI changes are a big
> 
> I think that this qualifies as a "bug" due to rewriting the supportive 
> code.  It was not an intentional ABI change.

I have changed these definitions, so it should work as in previous
versions now. The new tif_dirinfo.c file can be either taken from CVS or
from the 3.8.0 release with the following patch:

Index: tif_dirinfo.c
===================================================================
RCS file: /cvs/maptools/cvsroot/libtiff/libtiff/tif_dirinfo.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -1 -b -p -u -r1.60 -r1.61
--- tif_dirinfo.c       26 Dec 2005 14:31:25 -0000      1.60
+++ tif_dirinfo.c       4 Jan 2006 13:22:09 -0000       1.61
@@ -1,2 +1,2 @@
-/* $Id: tif_dirinfo.c,v 1.60 2005/12/26 14:31:25 dron Exp $ */
+/* $Id: tif_dirinfo.c,v 1.61 2006/01/04 13:22:09 dron Exp $ */
 
@@ -223,3 +223,3 @@ tiffFieldInfo[] = {
       1,       0,      "ReferenceBlackWhite" },
-    { TIFFTAG_XMLPACKET,       -1,-3,  TIFF_BYTE,      FIELD_CUSTOM,
+    { TIFFTAG_XMLPACKET,       -3,-3,  TIFF_BYTE,      FIELD_CUSTOM,
       0,       1,      "XMLPacket" },
@@ -257,5 +257,5 @@ tiffFieldInfo[] = {
 /* end Pixar tags */
-    { TIFFTAG_RICHTIFFIPTC, -1, -3,    TIFF_LONG,      FIELD_CUSTOM, 
+    { TIFFTAG_RICHTIFFIPTC, -3, -3,    TIFF_LONG,      FIELD_CUSTOM, 
       0,    1,   "RichTIFFIPTC" },
-    { TIFFTAG_PHOTOSHOP,    -1, -3,    TIFF_BYTE,      FIELD_CUSTOM, 
+    { TIFFTAG_PHOTOSHOP,    -3, -3,    TIFF_BYTE,      FIELD_CUSTOM, 
       0,    1,   "Photoshop" },
@@ -263,3 +263,3 @@ tiffFieldInfo[] = {
       0,       0,      "EXIFIFDOffset" },
-    { TIFFTAG_ICCPROFILE,      -1, -3, TIFF_UNDEFINED, FIELD_CUSTOM,
+    { TIFFTAG_ICCPROFILE,      -3, -3, TIFF_UNDEFINED, FIELD_CUSTOM,
       0,       1,      "ICC Profile" },

Reagrds,
Andrey

-- 
Andrey V. Kiselev
ICQ# 26871517
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
