Bug 197583

Summary: Empty <cmdline> node causes virsh crash
Product: [Fedora] Fedora Reporter: Mark McLoughlin <markmc>
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-07-04 07:42:05 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Mark McLoughlin 2006-07-04 07:10:26 EDT
In virDomainParseXMLOSDesc(), cur->children can be NULL if the txt node is empty


[root@lak test3]# grep cmdline test3.xml
    <cmdline></cmdline>

[root@lak test3]# gdb virsh
(gdb) run create test3.xml
Starting program: /usr/bin/virsh create test3.xml

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 46912500545936 (LWP 24715)]
virDomainParseXMLDesc (xmldesc=Variable "xmldesc" is not available.
) at xml.c:614
614                     if ((txt->type == XML_TEXT_NODE) && (txt->next == NULL))
Comment 1 Daniel Veillard 2006-07-04 07:42:05 EDT
Dohh !!
I fixed the other similar bugs found in that module, oops !
Commited in CVS.

  thanks,

Daniel