From 760a38c4c7ab66ae653d3acb92f5cda4bd44edd6 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Mon, 5 Feb 2007 03:39:36 +0200 Subject: [PATCH] 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). --- xkb/xkbUtils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c index 400306a22..062159ec6 100644 --- a/xkb/xkbUtils.c +++ b/xkb/xkbUtils.c @@ -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); }