diff mbox

[PULL,1/1] spice: monitors_config: check pointer before dereferencing

Message ID 1396866071-21634-2-git-send-email-kraxel@redhat.com
State New
Headers show

Commit Message

Gerd Hoffmann April 7, 2014, 10:21 a.m. UTC
Reported-by: Fabio Fantoni <fabio.fantoni@m2r.biz>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 ui/spice-display.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox

Patch

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.