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 5ACC4400107
	for <info@awaresystems.be>; Mon, 12 Jul 2010 21:33:20 +0200 (CEST)
Received: by mx-r.b-one.net (Postfix, from userid 106)
	id 50FB62915AEA; Mon, 12 Jul 2010 21:33:20 +0200 (CEST)
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 7A71B2915AED for
 <info@awaresystems.be>; Mon, 12 Jul 2010 21:33:19 +0200 (CEST)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by
 lists.maptools.org (Postfix) with ESMTP id 402281D12AC01; Mon, 12 Jul 2010
 14:32:28 -0500 (EST)
Received: from isadora.cybox.com (isadora.cybox.com [206.168.112.10]) by
 lists.maptools.org (Postfix) with ESMTP id A21001D11BD7F for
 <tiff@lists.maptools.org>; Mon, 12 Jul 2010 14:30:39 -0500 (EST)
Received: from aeolus.wriverody.net (vc7-1-52.dsl.indra.com [199.45.160.84])
 (authenticated) by isadora.cybox.com (msa 8.13.8/8.13.6) with ESMTP id
 o6CJUX7P019473 for <tiff@lists.maptools.org>; Mon, 12 Jul 2010 13:30:34 -0600
Message-ID: <4C3B6D53.9080305@cybox.com>
Date: Mon, 12 Jul 2010 13:30:27 -0600
From: Richard Nolde <richard.nolde@cybox.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9)
 Gecko/20100430 Fedora/3.0.4-2.fc12 Thunderbird/3.0.4
MIME-Version: 1.0
To: tiff@lists.maptools.org
References: <mailman.5.1278954003.25100.tiff@lists.maptools.org>
In-Reply-To: <mailman.5.1278954003.25100.tiff@lists.maptools.org>
Subject: [Tiff] strncpy in tiffcrop
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="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

Message: 1
> Date: Sun, 11 Jul 2010 13:36:30 -0400 (EDT)
> From: "Edward Lam"<edward@sidefx.com>
> Subject: Re: [Tiff] strlcpy vs strncpy
>    

> I only see problematic uses of strncpy in tiffcrop. The other uses of
>    
> strncpy (tiff2pdf, tiffsplit) use the common practice of explicitly NUL
> terminating the destination buffer immediately afterwards (ie. perform
> truncation).
>
>    
I'm usually pretty careful to make sure that the buffer is large enough 
to hold the original string plus the terminating NULL, but I'll check 
the code when I get a chance.

You may want to look at tiffcp as well (which I do not maintain).

Richard Nolde
> I don't see any problems with switching to use of strlcpy() as a means to
> ensure safer (even if not ideal) behaviour. As long as this is a better
> than nothing solution. :)
>
> Regards,
> -Edward
>
>
>
> ------------------------------
>
> _______________________________________________
> Tiff mailing list
> Tiff@lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/tiff
>
> End of Tiff Digest, Vol 74, Issue 6
> ***********************************
>
>    

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