aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2012-01-06 16:57:45 +0000
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2012-01-13 10:36:59 +0000
commitcee8e6add587e20ed1f4c5a95031a1697d7375b1 (patch)
treeaf428d6e8cbb45e67bc7a0136ce07baa08b61a70 /ui
parent8d98734651a8a601980b6e57788f2ed6a4ea620a (diff)
downloadqemu-cee8e6add587e20ed1f4c5a95031a1697d7375b1.zip
qemu-cee8e6add587e20ed1f4c5a95031a1697d7375b1.tar.gz
qemu-cee8e6add587e20ed1f4c5a95031a1697d7375b1.tar.bz2
vnc: fix no-lock-key-sync strncmp() length
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 <davidagilbert@uk.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/vnc.c2
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) {