diff mbox

[1/3] vnc: fix qemu crash when not configure vnc option

Message ID 1422535966-9948-2-git-send-email-arei.gonglei@huawei.com
State New
Headers show

Commit Message

Gonglei (Arei) Jan. 29, 2015, 12:52 p.m. UTC
From: Gonglei <arei.gonglei@huawei.com>

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

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
---
 ui/vnc.c | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Don Slutz Jan. 29, 2015, 4:14 p.m. UTC | #1
On 01/29/15 07:52, arei.gonglei@huawei.com wrote:
> From: Gonglei <arei.gonglei@huawei.com>
> 
> Reproducer:
> $ x86_64-softmmu/qemu-system-x86_64
> qemu-system-x86_64: Invalid parameter 'to'
> Segmentation fault (core dumped)
> 
> Signed-off-by: Gonglei <arei.gonglei@huawei.com>
> ---
>  ui/vnc.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/ui/vnc.c b/ui/vnc.c
> index a742c90..08b8b24 100644
> --- a/ui/vnc.c
> +++ b/ui/vnc.c
> @@ -3276,6 +3276,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,
>          },{
> 

The code change looks good, but does more then the commit message says.

Maybe include something like "Add missing vnc options: to, ipv4, ipv6".

   -Don Slutz
Gonglei (Arei) Jan. 30, 2015, 12:37 a.m. UTC | #2
On 2015/1/30 0:14, Don Slutz wrote:

> On 01/29/15 07:52, arei.gonglei@huawei.com wrote:
>> From: Gonglei <arei.gonglei@huawei.com>
>>
>> Reproducer:
>> $ x86_64-softmmu/qemu-system-x86_64
>> qemu-system-x86_64: Invalid parameter 'to'
>> Segmentation fault (core dumped)
>>
>> Signed-off-by: Gonglei <arei.gonglei@huawei.com>
>> ---
>>  ui/vnc.c | 9 +++++++++
>>  1 file changed, 9 insertions(+)
>>
>> diff --git a/ui/vnc.c b/ui/vnc.c
>> index a742c90..08b8b24 100644
>> --- a/ui/vnc.c
>> +++ b/ui/vnc.c
>> @@ -3276,6 +3276,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,
>>          },{
>>
> 
> The code change looks good, but does more then the commit message says.
> 
> Maybe include something like "Add missing vnc options: to, ipv4, ipv6".
> 

Will do, thanks.

Regards,
-Gonglei
diff mbox

Patch

diff --git a/ui/vnc.c b/ui/vnc.c
index a742c90..08b8b24 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -3276,6 +3276,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,
         },{