From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:42178) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rlejo-00044x-Uy for qemu-devel@nongnu.org; Fri, 13 Jan 2012 05:52:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rlejo-0001A1-1V for qemu-devel@nongnu.org; Fri, 13 Jan 2012 05:52:00 -0500 Received: from e06smtp12.uk.ibm.com ([195.75.94.108]:36796) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rlejn-00019m-Mj for qemu-devel@nongnu.org; Fri, 13 Jan 2012 05:51:59 -0500 Received: from /spool/local by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 13 Jan 2012 10:51:58 -0000 Received: from d06av09.portsmouth.uk.ibm.com (d06av09.portsmouth.uk.ibm.com [9.149.37.250]) by d06nrmr1407.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q0DApoUt1777884 for ; Fri, 13 Jan 2012 10:51:50 GMT Received: from d06av09.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q0DApoHe009860 for ; Fri, 13 Jan 2012 03:51:50 -0700 From: Stefan Hajnoczi Date: Fri, 13 Jan 2012 10:51:33 +0000 Message-Id: <1326451900-18325-6-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1326451900-18325-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1326451900-18325-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 05/12] vnc: fix no-lock-key-sync strncmp() length List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@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