dix: Increase allocation size for core keyboard keymap to avoid buffer overrun when copying keymap from extension devices.
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user