[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: |
Michael Tokarev |
Subject: |
Re: [Qemu-devel] [PATCH] vnc: fix segmentation fault when invalid vnc parameters are specified |
Date: |
Thu, 12 Mar 2015 10:07:07 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.5.0 |
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.
/mjt
> + if (!opts) {
> + return NULL;
> + }
> +
> + id = qemu_opts_id(opts);