mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
cb2a6ef8b5
Currently, an array of libxl_string_list (char **) or in other words, a triple char pointer is initialized. This is dereferenced to a char ** type and stored in serial_list, which is NULL at this point. There is an attempt to reference an element of this serial_list when making a call to libxlMakeChrdevStr which causes a segmentation fault. To fix this, we simply allocate an array of char * instead of libxl_string_list. This patch also adds testcases to extend coverage over both single serial and multiple serial cases. Signed-off-by: Rayhan Faizel <rayhan.faizel@gmail.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
26 lines
568 B
XML
26 lines
568 B
XML
<domain type='xen'>
|
|
<name>test-hvm</name>
|
|
<description>None</description>
|
|
<uuid>2147d599-9cc6-c0dc-92ab-4064b5446e9b</uuid>
|
|
<memory>1048576</memory>
|
|
<currentMemory>1048576</currentMemory>
|
|
<vcpu>4</vcpu>
|
|
<on_poweroff>destroy</on_poweroff>
|
|
<on_reboot>restart</on_reboot>
|
|
<on_crash>destroy</on_crash>
|
|
<clock offset='utc'/>
|
|
<os>
|
|
<type>hvm</type>
|
|
<loader>/usr/lib/xen/boot/hvmloader</loader>
|
|
<boot dev='hd'/>
|
|
</os>
|
|
<features>
|
|
<apic/>
|
|
<acpi/>
|
|
<pae/>
|
|
</features>
|
|
<devices>
|
|
<serial type='pty'/>
|
|
</devices>
|
|
</domain>
|