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
|
@ -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…
Reference in New Issue
Block a user