From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:39551) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RjD7J-0001xS-BV for qemu-devel@nongnu.org; Fri, 06 Jan 2012 11:58:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RjD7F-0001zN-Tn for qemu-devel@nongnu.org; Fri, 06 Jan 2012 11:58:09 -0500 Received: from e06smtp16.uk.ibm.com ([195.75.94.112]:37971) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RjD7F-0001yy-KK for qemu-devel@nongnu.org; Fri, 06 Jan 2012 11:58:05 -0500 Received: from /spool/local by e06smtp16.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 6 Jan 2012 16:58:03 -0000 From: Stefan Hajnoczi Date: Fri, 6 Jan 2012 16:57:45 +0000 Message-Id: <1325869065-32182-3-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1325869065-32182-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1325869065-32182-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 2/2] vnc: fix no-lock-key-sync strncmp() length List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, Stefan Hajnoczi The no-lock-key-sync option is being parsed incorrectly because of an outdated strcmp() length value. Use the correct length so that invalid option names do not match. Reported-by: Dr David Alan Gilbert Signed-off-by: Stefan Hajnoczi --- ui/vnc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/ui/vnc.c b/ui/vnc.c index 6767ada..1869a7a 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -2763,7 +2763,7 @@ int vnc_display_open(DisplayState *ds, const char *display) password = 1; /* Require password auth */ } else if (strncmp(options, "reverse", 7) == 0) { reverse = 1; - } else if (strncmp(options, "no-lock-key-sync", 9) == 0) { + } else if (strncmp(options, "no-lock-key-sync", 16) == 0) { lock_key_sync = 0; #ifdef CONFIG_VNC_SASL } else if (strncmp(options, "sasl", 4) == 0) { -- 1.7.7.3