[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] vnc: fix segmentation fault when invalid vnc pa
From: |
Gonglei |
Subject: |
Re: [Qemu-devel] [PATCH] vnc: fix segmentation fault when invalid vnc parameters are specified |
Date: |
Thu, 12 Mar 2015 15:22:15 +0800 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
On 2015/3/12 15:07, Michael Tokarev wrote:
> 12.03.2015 06:59, address@hidden wrote:
>> +++ b/ui/vnc.c
>> @@ -3698,8 +3698,13 @@ QemuOpts *vnc_parse_func(const char *str)
>> {
>> QemuOptsList *olist = qemu_find_opts("vnc");
>> QemuOpts *opts = qemu_opts_parse(olist, str, 1);
>> - const char *id = qemu_opts_id(opts);
>> + const char *id = NULL;
>
> Useless initializer.
>
Okay, will fix, thanks.
Regards,
-Gonglei
> /mjt
>
>> + if (!opts) {
>> + return NULL;
>> + }
>> +
>> + id = qemu_opts_id(opts);
>