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 1072b88a8f
commit ac2356843e

View File

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