Return-Path: <tiff-bounces@lists.maptools.org>
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-r.b-one.net (mx-r.one.com [91.198.169.249])
	by mail9.b-one.net (Postfix) with ESMTP id 6DCE2400520
	for <info@awaresystems.be>; Mon, 10 Jan 2011 19:00:18 +0100 (CET)
Received: by mx-r.b-one.net (Postfix, from userid 106)
	id 5E6BE6E8369A; Mon, 10 Jan 2011 19:00:18 +0100 (CET)
X-Virus-Scanned: by one.com
X-Spam-Flag: NO
X-Spam-Score: 0
X-Spam-Level: 
X-Spam-Status: No, score=0 tagged_above=0 required=4 tests=[none]
X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4
Received: from lists.maptools.org (lists.maptools.org [65.39.174.144]) by
 mx-r.b-one.net (Postfix) with ESMTP id B35A46E83693 for
 <info@awaresystems.be>; Mon, 10 Jan 2011 19:00:17 +0100 (CET)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by
 lists.maptools.org (Postfix) with ESMTP id 0DDB986A39; Mon, 10 Jan 2011
 12:59:17 -0500 (EST)
Received: from mail-ew0-f44.google.com (mail-ew0-f44.google.com
 [209.85.215.44]) by lists.maptools.org (Postfix) with ESMTP id B941E869E3 for
 <tiff@lists.maptools.org>; Mon, 10 Jan 2011 12:53:16 -0500 (EST)
Received: by ewy8 with SMTP id 8so9376134ewy.3 for <tiff@lists.maptools.org>;
 Mon, 10 Jan 2011 09:53:15 -0800 (PST)
MIME-Version: 1.0
Received: by 10.14.48.6 with SMTP id u6mr2375543eeb.4.1294681994997; Mon, 10
 Jan 2011 09:53:14 -0800 (PST)
Received: by 10.14.127.6 with HTTP; Mon, 10 Jan 2011 09:53:14 -0800 (PST)
In-Reply-To: <AANLkTinAnGOB5FVg+k7C1D9OAD2ZWXAHVsV+kPQksMHU@mail.gmail.com>
References: <AANLkTinAnGOB5FVg+k7C1D9OAD2ZWXAHVsV+kPQksMHU@mail.gmail.com>
Date: Mon, 10 Jan 2011 12:53:14 -0500
Message-ID: <AANLkTimM5eBHoJe2-pgeTsz-et-Re-zMwKt0LfEUV0ut@mail.gmail.com>
From: Olivier Paquet <olivier.paquet@gmail.com>
To: IMoL <imol00@gmail.com>
Cc: tiff@lists.maptools.org
Subject: Re: [Tiff] [libtiff v3.9.4] TIFFClientOpen() & 'w' mode
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.9
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>
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

On Mon, Jan 10, 2011 at 11:47 AM, IMoL <imol00@gmail.com> wrote:
> If I'm reading the code correctly, tif->tif_mode & O_TRUNC in the if
> statement will always be false. =A0So shouldn't that be m & O_TRUNC?

It certainly looks like that was the intent. As it is written now,
there is a bogus attempt to read the header from the truncated file
which should fail for reasonable implementations of the read proc. I
don't think there would be any harm in "fixing" it but I'd appreciate
another set of eyes to look that over.

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