[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1/3] libxlu_cfg: reject unknown characters following '\'
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). If that would result in more than 80 characters then it is acceptable to pull the string in more than you would normally, e.g if this is (as I expect it will be) too long: Â Â Â Â Â Â Â Â xlu__cfgl_lexicalerror(ctx, "invalid character after backlash in quoted string"); then it's ok to do: Â Â Â Â Â Â Â Â xlu__cfgl_lexicalerror(ctx, "invalid character after backlash in quoted string"); (I usually try and keep it to a multiple of 4 spaces indent, FWIW) or for really long strings even: Â Â Â Â Â Â Â Â xlu__cfgl_lexicalerror(ctx, "invalid character after backlash in quoted string blah blah blah"); is preferable to breaking the string in half. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |