From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38133) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WX6gI-0007fM-TF for qemu-devel@nongnu.org; Mon, 07 Apr 2014 06:21:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WX6gB-0000Kx-Vx for qemu-devel@nongnu.org; Mon, 07 Apr 2014 06:21:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41667) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WX6gB-0000Kr-OP for qemu-devel@nongnu.org; Mon, 07 Apr 2014 06:21:27 -0400 From: Gerd Hoffmann Date: Mon, 7 Apr 2014 12:21:11 +0200 Message-Id: <1396866071-21634-2-git-send-email-kraxel@redhat.com> In-Reply-To: <1396866071-21634-1-git-send-email-kraxel@redhat.com> References: <1396866071-21634-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PULL 1/1] spice: monitors_config: check pointer before dereferencing List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , Anthony Liguori Reported-by: Fabio Fantoni Signed-off-by: Gerd Hoffmann --- ui/spice-display.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ui/spice-display.c b/ui/spice-display.c index e28698c..ce6b220 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -549,6 +549,10 @@ static int interface_client_monitors_config(QXLInstance *sin, QemuUIInfo info; int rc; + if (!mc) { + return 1; + } + /* * FIXME: multihead is tricky due to the way * spice has multihead implemented. -- 1.8.3.1