[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Re: [Xen-staging] [xen-unstable] ia64 and ppc: Remove uses of strcpy and strncpy.
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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |