Fix crash on XkbSetMap

Since group_info and width are used for the key actions allocations,
when modifying them we need to take care of reallocation key actions if
needed.

(cherry picked from commit fabc421962)
This commit is contained in:
Samuel Thibault 2019-07-01 02:33:26 +02:00 committed by Peter Hutterer
parent c747dbb250
commit 616b3e1dd1

View File

@ -2110,6 +2110,9 @@ SetKeySyms(ClientPtr client,
}
}
}
if (XkbKeyHasActions(xkb, i + req->firstKeySym))
XkbResizeKeyActions(xkb, i + req->firstKeySym,
XkbNumGroups(wire->groupInfo) * wire->width);
oldMap->kt_index[0] = wire->ktIndex[0];
oldMap->kt_index[1] = wire->ktIndex[1];
oldMap->kt_index[2] = wire->ktIndex[2];