1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

* src/xml.c: apply patch from Masayuki Sunou about an uninitialized

string when attaching a device
Daniel
This commit is contained in:
Daniel Veillard 2007-06-04 08:42:41 +00:00
parent ae35e97ec8
commit c6e2ef60df
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,8 @@
Mon Jun 4 10:41:25 CEST 2007 Daniel Veillard <veillard@redhat.com>
* src/xml.c: apply patch from Masayuki Sunou about an uninitialized
string when attaching a device
Fri Jun 1 16:02:12 CEST 2007 Daniel Veillard <veillard@redhat.com>
* src/xml.c: added a comment about (type ioemu) not needed

View File

@ -1482,6 +1482,7 @@ virParseXMLDevice(virConnectPtr conn, char *xmldesc, int hvm, int xendConfigVers
return (NULL);
buf.size = 1000;
buf.use = 0;
buf.content[0] = 0;
xml = xmlReadDoc((const xmlChar *) xmldesc, "domain.xml", NULL,
XML_PARSE_NOENT | XML_PARSE_NONET |
XML_PARSE_NOERROR | XML_PARSE_NOWARNING);
@ -1493,6 +1494,9 @@ virParseXMLDevice(virConnectPtr conn, char *xmldesc, int hvm, int xendConfigVers
if (xmlStrEqual(node->name, BAD_CAST "disk")) {
if (virDomainParseXMLDiskDesc(conn, node, &buf, hvm, xendConfigVersion) != 0)
goto error;
/* SXP is not created when device is "floppy". */
else if (buf.use == 0)
goto error;
}
else if (xmlStrEqual(node->name, BAD_CAST "interface")) {
if (virDomainParseXMLIfDesc(conn, node, &buf, hvm) != 0)