]> xenbits.xensource.com Git - libvirt.git/commitdiff
domain-conf: escape string for socket attribute
authorPavel Hrdina <phrdina@redhat.com>
Mon, 31 Aug 2015 13:33:49 +0000 (15:33 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Thu, 3 Sep 2015 16:14:42 +0000 (18:14 +0200)
Commit d091518b tried to escape all strings in produced XML, but missed
this one.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
src/conf/domain_conf.c

index 69225f47f9e2e99362a380096c28a062941a280f..f95190ff839e67043da8f81f95f8a17e18275507 100644 (file)
@@ -21118,9 +21118,7 @@ virDomainGraphicsDefFormat(virBufferPtr buf,
     switch (def->type) {
     case VIR_DOMAIN_GRAPHICS_TYPE_VNC:
         if (def->data.vnc.socket) {
-            if (def->data.vnc.socket)
-                virBufferAsprintf(buf, " socket='%s'",
-                                  def->data.vnc.socket);
+            virBufferEscapeString(buf, " socket='%s'", def->data.vnc.socket);
         } else {
             if (def->data.vnc.port &&
                 (!def->data.vnc.autoport || !(flags & VIR_DOMAIN_DEF_FORMAT_INACTIVE)))