]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
vnc: fix qemu crash when not configure vnc option
authorGonglei <arei.gonglei@huawei.com>
Fri, 30 Jan 2015 02:14:34 +0000 (10:14 +0800)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 16 Feb 2015 07:47:59 +0000 (08:47 +0100)
Add missing vnc options: to, ipv4, ipv6 and fix
qemu crash.

Reproducer:
$ x86_64-softmmu/qemu-system-x86_64
qemu-system-x86_64: Invalid parameter 'to'
Segmentation fault (core dumped)

BTW the patch fix the below bug:
https://bugs.launchpad.net/qemu/+bug/1414222

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Don Slutz <dslutz@verizon.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ui/vnc.c

index 02552ee27b26bde1812e1f9a0403f08baf06f45e..90e8a882e3c71ece88c5c6848d2fc7370ce3a9aa 100644 (file)
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -3271,6 +3271,15 @@ static QemuOptsList qemu_vnc_opts = {
         },{
             .name = "connections",
             .type = QEMU_OPT_NUMBER,
+        },{
+            .name = "to",
+            .type = QEMU_OPT_NUMBER,
+        },{
+            .name = "ipv4",
+            .type = QEMU_OPT_BOOL,
+        },{
+            .name = "ipv6",
+            .type = QEMU_OPT_BOOL,
         },{
             .name = "password",
             .type = QEMU_OPT_BOOL,