qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RESEND PATCH 1.1] vnc: fix segfault in vnc_display_pw_


From: Anthony Liguori
Subject: Re: [Qemu-devel] [RESEND PATCH 1.1] vnc: fix segfault in vnc_display_pw_expire()
Date: Wed, 30 May 2012 14:45:36 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1

On 05/24/2012 04:55 PM, Gerd Hoffmann wrote:
NULL pointer dereference in case no vnc server is configured.
Catch this and return -EINVAL like vnc_display_password() does.

Signed-off-by: Gerd Hoffmann<address@hidden>

Applied.  Thanks.

Regards,

Anthony Liguori

---
  ui/vnc.c |    4 ++++
  1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/ui/vnc.c b/ui/vnc.c
index be384a5..54bc5ad 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -2849,6 +2849,10 @@ int vnc_display_pw_expire(DisplayState *ds, time_t 
expires)
  {
      VncDisplay *vs = ds ? (VncDisplay *)ds->opaque : vnc_display;

+    if (!vs) {
+        return -EINVAL;
+    }
+
      vs->expires = expires;
      return 0;
  }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]