mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +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>
48 lines
1.2 KiB
XML
48 lines
1.2 KiB
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='null'/>
|
|
<serial type='stdio'/>
|
|
<serial type='vc'/>
|
|
<serial type='pty'/>
|
|
<serial type='pipe'>
|
|
<source path='/tmp/file'/>
|
|
</serial>
|
|
<serial type='file'>
|
|
<source path='/tmp/serial.log'/>
|
|
</serial>
|
|
<serial type='dev'>
|
|
<source path='/dev/ttyS2'/>
|
|
</serial>
|
|
<serial type='udp'>
|
|
<source mode='connect' service='9999'/>
|
|
</serial>
|
|
<serial type='tcp'>
|
|
<source mode='connect' host='127.0.0.1' service='9999'/>
|
|
<protocol type='raw'/>
|
|
</serial>
|
|
<serial type='unix'>
|
|
<source mode='bind' path='/tmp/serial-server.sock'/>
|
|
</serial>
|
|
</devices>
|
|
</domain>
|