From 836864b65794dc0954a01245e418e714cead8125 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 13 Mar 2009 12:43:17 +1000 Subject: [PATCH] xkb: don't overrun the map index when accessing symbols. Signed-off-by: Peter Hutterer --- xkb/xkbUtils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c index 9a1edc901..5ae426dbb 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);