Return-Path: <tiff-bounces@lists.maptools.org>
Received: from infbas003.isp.belgacom.be (localhost [127.0.0.1])
        by inav025.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AV-3.00) with ESMTP id jBDLIePk027499
        for <joris.at.lebbeke@skynet.be>; Tue, 13 Dec 2005 22:18:40 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from inas005.isp.belgacom.be (inas005.isp.belgacom.be [195.238.2.11])
        by infbas003.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id jBDLIdDp025435
        for <joris.at.lebbeke@skynet.be>; Tue, 13 Dec 2005 22:18:39 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from inmx001.isp.belgacom.be (inmx001.isp.belgacom.be [195.238.5.1])
        by inas005.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AS-2.03) with ESMTP id jBDLIb5c030426
        for <joris.at.lebbeke@skynet.be>; Tue, 13 Dec 2005 22:18:38 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153] (may be forged))
        by inmx001.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id jBDLIVMA020960
        for <joris.at.lebbeke@skynet.be>; Tue, 13 Dec 2005 22:18:32 +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 jBDLBqmO020512;
	Tue, 13 Dec 2005 16:12:24 -0500
Received: from mail.srcp.com (mail.srcp.com [12.5.252.28] (may be forged))
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id jBDLBnn6020507
	for <tiff@lists.maptools.org>; Tue, 13 Dec 2005 16:11:49 -0500
Received: from CORPDALLMSG05.na.srcp.net ([10.150.10.111] RDNS failed) by
	mail.srcp.com with Microsoft SMTPSVC(6.0.3790.211); 
	Tue, 13 Dec 2005 15:11:48 -0600
X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Subject: RE: [Tiff] Bug in tiffcp (unsupported codecs return 0)
Date: Tue, 13 Dec 2005 15:11:46 -0600
Message-ID: <741E24F735AED141B61948AC155E7DAA60006C@CORPDALLMSG05.na.srcp.net>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: [Tiff] Bug in tiffcp (unsupported codecs return 0)
Thread-Index: AcYAJmQdZyyDU5BgRRig0o0Oj4OdbgAAyh6g
From: "Frank, Jason" <JasonFrank@srcp.com>
To: "Andrey Kiselev" <dron@ak4719.spb.edu>, <tiff@lists.maptools.org>
X-OriginalArrivalTime: 13 Dec 2005 21:11:48.0288 (UTC)
	FILETIME=[D458B400:01C60029]
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by duke.maptools.org id
	jBDLBnn6020507
Cc: 
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.00000f7c
X-MSP-STORE: Tue, 13 Dec 2005 22:18:41 +0100
Status:   

Thanks, I'll get it built today and test it out in the morning.  I can
always unlink it myself.  I'm just wondering what the advantage is in
leaving the file around, taking up disk space, when it doesn't do any
good for anyone.  I can see leaving it around for forensics, of course.
I'm really just thinking out loud.

What file did you make the change in?

Jason

-----Original Message-----
From: tiff-bounces@lists.maptools.org
[mailto:tiff-bounces@lists.maptools.org] On Behalf Of Andrey Kiselev
Sent: Tuesday, December 13, 2005 2:09 PM
To: tiff@lists.maptools.org
Subject: Re: [Tiff] Bug in tiffcp (unsupported codecs return 0)

On Tue, Dec 13, 2005 at 01:53:49PM -0600, Frank, Jason wrote:
> 
> --- ../tiff-3.7.4-orig/tools/tiffcp.c   2005-07-08 04:03:49.000000000
> -0500
> +++ tools/tiffcp.c      2005-12-13 10:45:23.000000000 -0600
> @@ -852,8 +852,10 @@
>                 for (s = 0; s < ns; s++) {
>                         tsize_t cc = (row + rowsperstrip > 
> imagelength) ?
>                             TIFFVStripSize(in, imagelength - row) :
> stripsize;
> -                       if (TIFFReadEncodedStrip(in, s, buf, cc) < 0
&&
> !ignore)
> -                               break;
> +                       if (TIFFReadEncodedStrip(in, s, buf, cc) < 0 
> + &&
> !ignore) {
> +                         _TIFFfree(buf);
> +                         return FALSE;
> +                       }
>                         if (TIFFWriteEncodedStrip(out, s, buf, cc) < 
> 0) {
>                                 _TIFFfree(buf);
>                                 return (FALSE);
> 
> This same issue appears to be present in all of the cpFunc's, athough 
> they're all coded slightly differently.  I suppose we could have to do

> that to all the cpFuncs (and possibly some others...)
> 
> I'm worried that this is not the correct fix.  Can someone tell me if 
> I'm barking up the right tree?

Jason,

I have fixed this issue today. Please, try the latest CVS snapshot and
report results, if something will be wrong.

> Also, I've noticed that when this happens, we do not unlink the new 
> TIF that we're creating (assuming that we're not appending.)  That's a

> pretty easy fix.  Any interest in doing that?

Well, I don't want to unlink the broken file. Does it really needed?

Regards,
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/

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