From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jim Fehlig Subject: Re: [PATCH 1/3] libxlu_cfg: reject unknown characters following '\' Date: Wed, 17 Feb 2016 10:26:58 -0700 Message-ID: <56C4AD62.7030406@suse.com> References: <1455681279-28451-1-git-send-email-jfehlig@suse.com> <1455681279-28451-2-git-send-email-jfehlig@suse.com> <1455703535.814.142.camel@citrix.com> <1455703896.814.149.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1455703896.814.149.camel@citrix.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: Ian Campbell , xen-devel@lists.xen.org Cc: wei.liu2@citrix.com, ian.jackson@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On 02/17/2016 03:11 AM, Ian Campbell wrote: > On Wed, 2016-02-17 at 10:05 +0000, Ian Campbell wrote: >> On Tue, 2016-02-16 at 20:54 -0700, Jim Fehlig wrote: >>> When dequoting config strings in xlu__cfgl_dequote(), unknown >>> characters following a '\', and the '\' itself, are discarded. >>> E.g. a disk configuration string containing >>> >>> rbd:pool/image:mon_host=192.168.0.100\:6789 >>> >>> would be dequoted as >>> >>> rbd:pool/image:mon_host=192.168.0.1006789 >>> >>> Instead of discarding the '\' and unknown character, reject the >>> string and set error to EINVAL. >> Missing your S-o-b. >> >> Other than that: >> >>> + xlu__cfgl_lexicalerror(ctx, "invalid character after >>> backlash " >>> + "in quoted string"); >> Please try where possible not to split string constants (so log messages >> can more easily be grepped for). > I see now that this parsing code is pretty liberally ignoring this advice > already. So apart from the missing S-o-b this patch is Your suggestion is a good one and is common throughout much of libxl, so I pulled back the error string indentation in V2. Regards, Jim