XKB: Fix size_syms calculation bug

Apparently it needed to be nSyms*15/10, not *12/10; make it match the
other allocation code.

(cherry picked from xorg/xserver@f292de2ef1)

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/279>
This commit is contained in:
Daniel Stone 2007-03-21 02:04:12 +02:00 committed by Alan Coopersmith
parent d6e1ca046a
commit 158be3ebd7

View file

@ -455,7 +455,7 @@ XkbResizeKeyType(XkbDescPtr xkb,
if (nResize > 0) {
int nextMatch;
xkb->map->size_syms = (nTotal * 12) / 10;
xkb->map->size_syms = (nTotal * 15) / 10;
newSyms = _XkbTypedCalloc(xkb->map->size_syms, KeySym);
if (newSyms == NULL)
return BadAlloc;