From: Ian Campbell Subject: Re: [PATCH v2 02/21] xen: guestcopy: Provide an helper to safely copy string from guest Date: Tue, 9 Sep 2014 14:40:29 +0100 Message-ID: <1410270029.8217.183.camel@kazak.uk.xensource.com> References: <1406818852-31856-1-git-send-email-julien.grall@linaro.org> <1406818852-31856-3-git-send-email-julien.grall@linaro.org> <53DB6E9E02000078000284F9@mail.emea.novell.com> <1410267129.8217.160.camel@kazak.uk.xensource.com> <540F1A240200007800032AD4@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XRLet-0006KO-CS for xen-devel@lists.xenproject.org; Tue, 09 Sep 2014 13:40:35 +0000 In-Reply-To: <540F1A240200007800032AD4@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: Keir Fraser , tim@xen.org, Julien Grall , Ian Jackson , stefano.stabellini@citrix.com, xen-devel@lists.xenproject.org, Daniel De Graaf List-Id: xen-devel@lists.xenproject.org On Tue, 2014-09-09 at 14:17 +0100, Jan Beulich wrote: > >>> On 09.09.14 at 14:52, wrote: > > On Fri, 2014-08-01 at 09:40 +0100, Jan Beulich wrote: > >> >>> On 31.07.14 at 17:00, wrote: > >> > --- /dev/null > >> > +++ b/xen/common/guestcopy.c > >> > @@ -0,0 +1,29 @@ > >> > +#include > >> > +#include > >> > +#include > >> > + > >> > +/* The function copies a string from the guest and add a NUL-terminated to > >> > + * make sure the string is correctly finished. */ > >> > >> "... and adds a NUL-terminator ...". Also not sure about "finished" > >> here. > > > > It does sound odd. "correctly terminated" would be more usual, but given > > the context is repetitive. Perhaps: "and add a NULL to make sure that > > the string is correctly terminated"? > > With s/add/adds/, maybe. Yes. > Albeit personally I dislike using NULL for > other than pointers - I'd prefer NUL or NIL for the purpose here. Me too, that was a typo, sorry! Ian.