From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47787) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNH0d-0002iL-Nv for qemu-devel@nongnu.org; Mon, 16 Feb 2015 03:26:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YNH0c-0007y9-TT for qemu-devel@nongnu.org; Mon, 16 Feb 2015 03:26:27 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50422) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNH0c-0007y4-Mi for qemu-devel@nongnu.org; Mon, 16 Feb 2015 03:26:26 -0500 From: Gerd Hoffmann Date: Mon, 16 Feb 2015 09:26:05 +0100 Message-Id: <1424075165-25016-8-git-send-email-kraxel@redhat.com> In-Reply-To: <1424075165-25016-1-git-send-email-kraxel@redhat.com> References: <1424075165-25016-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PULL 7/7] vnc: fix coverity warning List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , Anthony Liguori 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 --- ui/vnc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/vnc.c b/ui/vnc.c index 14289fd..10a2724 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -3248,6 +3248,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); } -- 1.8.3.1