[libvirt] [PATCH] domain-conf: escape string for socket attribute

Pavel Hrdina phrdina at redhat.com
Mon Aug 31 13:37:01 UTC 2015


Commit d091518b tried to escape all strings in produced XML, but missed
this one.

Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
---
 src/conf/domain_conf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index c5e9653..56f9460 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -21060,8 +21060,8 @@ virDomainGraphicsDefFormat(virBufferPtr buf,
     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)))
-- 
2.5.0




More information about the libvir-list mailing list