[PATCH] xkb: don't overrun the map index when accessing symbols.

Peter Hutterer peter.hutterer at who-t.net
Thu Mar 12 20:54:53 PDT 2009


Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
This seems to be the cause for xmodmap breaking on master.

 xkb/xkbUtils.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index 9a1edc9..5ae426d 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -232,7 +232,7 @@ XkbMapChangesPtr	mc;
 
     mc= (changes?(&changes->map):NULL);
 
-    syms= &pCore->map[(first-xkb->min_key_code)*pCore->mapWidth];
+    syms= &pCore->map[(first - pCore->minKeyCode) * pCore->mapWidth];
     for (key=first; key<(first+num); key++,syms+= pCore->mapWidth) {
         explicit= xkb->server->explicit[key]&XkbExplicitKeyTypesMask;
         types[XkbGroup1Index]= XkbKeyKeyTypeIndex(xkb,key,XkbGroup1Index);
-- 
1.6.0.6



More information about the xorg-devel mailing list