WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

Re: [Xen-devel] [PATCH] Clean up and fix errors in strncpy -> strlcpy co

To: Alex Williamson <alex.williamson@xxxxxx>
Subject: Re: [Xen-devel] [PATCH] Clean up and fix errors in strncpy -> strlcpy conversion
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Tue, 30 Jan 2007 17:37:13 +0000
Cc: Aron Griffis <aron@xxxxxx>, Christoph Egger <Christoph.Egger@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 30 Jan 2007 09:36:59 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1170178188.10792.107.camel@bling>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcdElUauhbMkerCIEduv7gANk04WTA==
Thread-topic: [Xen-devel] [PATCH] Clean up and fix errors in strncpy -> strlcpy conversion
User-agent: Microsoft-Entourage/11.3.3.061214


On 30/1/07 5:29 pm, "Alex Williamson" <alex.williamson@xxxxxx> wrote:

>    Sorry, but this is still wrong.  Some of these fields we're filling
> completely, and tagging a NUL at the end just doesn't work.  I suggest
> replacing all the safe_strcpy()s with memcpy()s.  Patch below.  Thanks,

Given the ACPI fields aren't proper C strings (as you say, they don't have
to be NUL terminated) avoiding use of str* functions makes sense.

 -- Keir




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel