summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2007-03-25 09:41:33 +0930
committerPeter Hutterer <peter@cs.unisa.edu.au>2007-03-25 15:24:47 +0930
commitac2356843e38b3400142bc54b65393c12976fc07 (patch)
tree4acd1280801863208c022d0ada308bf371d354e5 /dix
parent1072b88a8f352484e70bc749e300c936e5600480 (diff)
dix: Increase allocation size for core keyboard keymap to avoid buffer overrun when copying keymap from extension devices.
Diffstat (limited to 'dix')
-rw-r--r--dix/devices.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dix/devices.c b/dix/devices.c
index f73841932..5996b75cd 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -238,7 +238,7 @@ CoreKeyboardProc(DeviceIntPtr pDev, int what)
keySyms.mapWidth = 4;
keySyms.map = (KeySym *)xcalloc(sizeof(KeySym),
(keySyms.maxKeyCode -
- keySyms.minKeyCode) *
+ keySyms.minKeyCode + 1) *
keySyms.mapWidth);
if (!keySyms.map) {
ErrorF("Couldn't allocate core keymap\n");