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>
64 lines
1.3 KiB
JSON
64 lines
1.3 KiB
JSON
{
|
|
"c_info": {
|
|
"type": "hvm",
|
|
"name": "test-hvm",
|
|
"uuid": "2147d599-9cc6-c0dc-92ab-4064b5446e9b"
|
|
},
|
|
"b_info": {
|
|
"max_vcpus": 4,
|
|
"avail_vcpus": [
|
|
0,
|
|
1,
|
|
2,
|
|
3
|
|
],
|
|
"max_memkb": 1048576,
|
|
"target_memkb": 1048576,
|
|
"shadow_memkb": 1234,
|
|
"sched_params": {
|
|
|
|
},
|
|
"acpi": "True",
|
|
"apic": "True",
|
|
"type.hvm": {
|
|
"pae": "True",
|
|
"nographic": "True",
|
|
"vga": {
|
|
"kind": "none"
|
|
},
|
|
"vnc": {
|
|
"enable": "False"
|
|
},
|
|
"sdl": {
|
|
"enable": "False"
|
|
},
|
|
"spice": {
|
|
|
|
},
|
|
"serial_list": [
|
|
"null",
|
|
"stdio",
|
|
"vc",
|
|
"pty",
|
|
"pipe:/tmp/file",
|
|
"file:/tmp/serial.log",
|
|
"/dev/ttyS2",
|
|
"udp::9999@:0",
|
|
"tcp:127.0.0.1:9999",
|
|
"unix:/tmp/serial-server.sock,server,nowait"
|
|
],
|
|
"boot": "c",
|
|
"rdm": {
|
|
|
|
}
|
|
},
|
|
"arch_arm": {
|
|
|
|
},
|
|
"arch_x86": {
|
|
|
|
}
|
|
},
|
|
"on_reboot": "restart"
|
|
}
|