]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
conf: error out on invalid host id
authorLuyao Huang <lhuang@redhat.com>
Thu, 26 Feb 2015 06:14:20 +0000 (14:14 +0800)
committerJán Tomko <jtomko@redhat.com>
Thu, 26 Feb 2015 08:04:13 +0000 (09:04 +0100)
https://bugzilla.redhat.com/show_bug.cgi?id=1196503

We already check whether the host id is valid or not, add a jump
to forbid invalid host id.

Signed-off-by: Luyao Huang <lhuang@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
(cherry picked from commit 719cd2182bf06196b26204a8cf88d28001b1d79b)

src/conf/network_conf.c

index 892bd8a2c38bed9e060be373bbcb96c2a5bd8d6a..6812f1548876a3fa562230499d36fa6caec6ac25 100644 (file)
@@ -725,6 +725,7 @@ virNetworkDHCPHostDefParseXML(const char *networkName,
             virReportError(VIR_ERR_XML_ERROR,
                            _("Invalid character '%c' in id '%s' of network '%s'"),
                            *cp, id, networkName);
+            goto cleanup;
         }
     }