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-devel

Re: [Xen-devel] Re: [Xen-staging] [xen-unstable] ia64 and ppc: Remove us

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] Re: [Xen-staging] [xen-unstable] ia64 and ppc: Remove uses of strcpy and strncpy.
From: Aron Griffis <aron@xxxxxx>
Date: Mon, 29 Jan 2007 19:06:09 -0500
Delivery-date: Mon, 29 Jan 2007 16:01:02 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20070129235356.GC27235@xxxxxxxxx>
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>
Mail-followup-to: xen-devel@xxxxxxxxxxxxxxxxxxx
References: <200701291502.l0TF2Md1000372@xxxxxxxxxxxxxxxxxxxxxxx> <20070129235356.GC27235@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.13 (2006-08-11)
Aron Griffis wrote:  [Mon Jan 29 2007, 06:53:57PM EST]
> Additionally...
> 
> Xen staging patchbot-unstable wrote:  [Mon Jan 29 2007, 10:02:21AM EST]
> > --- a/xen/arch/ia64/xen/gdbstub.c   Mon Jan 29 14:59:42 2007 +0000
> > +++ b/xen/arch/ia64/xen/gdbstub.c   Mon Jan 29 15:01:33 2007 +0000
> > @@ -639,7 +639,7 @@ kgdb_get_reg(int regnum, struct unw_fram
> >             outbuffer[size*2] = 0;
> >     }
> >     else
> > -           strcpy(outbuffer, "E0");
> > +           strlcpy(outbuffer, "E0", sizeof("E0"));
> 
> Better to use safe_strcpy here instead of duplicating

My mistake here.  safe_strcpy uses sizeof(dst) not sizeof(src).  Your
change seems like the best choice in the absence of strcpy()

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