summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2006-04-01 21:49:44 +0000
committerDaniel Stone <daniel@fooishbar.org>2006-04-01 21:49:44 +0000
commit5c0a2088e229d05c38e5df7daea45af0d7db7daf (patch)
tree6a5227178dfd19bc16b1c62e42f8a943e7c4b6ea
parent1e764feab595b781dab22d6e41c26f118c9d41b5 (diff)
Bug #6428: Fix off-by-one error when walking off the end of the vmodmap
list.
-rw-r--r--ChangeLog4
-rw-r--r--xkb/xkb.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 324f59aea..eb03ab973 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,10 @@
(To those wondering about the date: Yes, this is me doing an Xprint
commit, but it fixes the --disable-xprint path, so.)
+ * xkb/xkb.c: (XkbSizeVirtualModMap):
+ Bug #6428: Fix off-by-one error when walking off the end of the
+ vmodmap list.
+
2006-03-31 Eric Anholt <anholt@FreeBSD.org>
* exa/exa_unaccel.c: (ExaCheckComposite):
diff --git a/xkb/xkb.c b/xkb/xkb.c
index 3cdf4d124..fdfd2f3cd 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -1255,7 +1255,7 @@ XkbSizeVirtualModMap(XkbDescPtr xkb,xkbGetMapReply *rep)
rep->totalVModMapKeys= 0;
return 0;
}
- for (nRtrn=i=0;i<rep->nVModMapKeys;i++) {
+ for (nRtrn=i=0;i<rep->nVModMapKeys-1;i++) {
if (xkb->server->vmodmap[i+rep->firstVModMapKey]!=0)
nRtrn++;
}