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:
Daniel Stone 2007-02-05 03:39:36 +02:00 committed by Daniel Stone
parent 17d85387d1
commit 760a38c4c7

View File

@ -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);
}