mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-24 18:20:05 +01:00
XkbCopyKeymap: fix copy-and-waste accident
When we reallocated modmap, we accidentally clobbered syms with the result, leaving syms definitely too small, and modmap also potentially too small (as well as not actually allocated anymore).
This commit is contained in:
parent
17d85387d1
commit
760a38c4c7
1 changed files with 1 additions and 1 deletions
|
|
@ -1220,7 +1220,7 @@ XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies)
|
|||
tmp = xalloc(src->max_key_code + 1);
|
||||
if (!tmp)
|
||||
return FALSE;
|
||||
dst->map->syms = tmp;
|
||||
dst->map->modmap = tmp;
|
||||
}
|
||||
memcpy(dst->map->modmap, src->map->modmap, src->max_key_code + 1);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue