From: Paolo Bonzini <pbonzini@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>, qemu-devel@nongnu.org
Cc: Anthony Liguori <aliguori@amazon.com>
Subject: Re: [Qemu-devel] [PATCH] vnc: fix coverity warning
Date: Wed, 11 Feb 2015 17:41:58 +0100 [thread overview]
Message-ID: <54DB8656.8050401@redhat.com> (raw)
In-Reply-To: <1423672645-12452-1-git-send-email-kraxel@redhat.com>
On 11/02/2015 17:37, Gerd Hoffmann wrote:
> vnc_display_local_addr will not be called with an invalid display id.
> Add assert() to silence coverity warning about a null pointer dereference.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> ui/vnc.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/ui/vnc.c b/ui/vnc.c
> index e291987..25ba340 100644
> --- a/ui/vnc.c
> +++ b/ui/vnc.c
> @@ -3252,6 +3252,7 @@ char *vnc_display_local_addr(const char *id)
> {
> VncDisplay *vs = vnc_display_find(id);
>
> + assert(vs);
> return vnc_socket_local_addr("%s:%s", vs->lsock);
> }
>
>
If you want, I can just silence the warning in Coverity.
Paolo
next prev parent reply other threads:[~2015-02-11 16:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-11 16:37 [Qemu-devel] [PATCH] vnc: fix coverity warning Gerd Hoffmann
2015-02-11 16:41 ` Paolo Bonzini [this message]
2015-02-11 16:48 ` Gerd Hoffmann
2015-02-12 9:27 ` Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54DB8656.8050401@redhat.com \
--to=pbonzini@redhat.com \
--cc=aliguori@amazon.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.