dix: Increase allocation size for core keyboard keymap to avoid buffer

overrun when copying keymap from extension devices.
This commit is contained in:
Peter Hutterer 2007-03-25 09:41:33 +09:30
parent f8cd19bd16
commit e54311395e

View File

@ -259,7 +259,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");