File U_0003-Fix-crash-on-XkbSetMap.patch of Package xorg-x11-server.28109

From fabc4219622f3c0b41b1cb897c46e092377059e3 Mon Sep 17 00:00:00 2001
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Mon, 1 Jul 2019 02:33:26 +0200
Subject: [PATCH 03/12] Fix crash on XkbSetMap

Since group_info and width are used for the key actions allocations,
when modifying them we need to take care of reallocation key actions if
needed.
---
 xkb/xkb.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/xkb/xkb.c b/xkb/xkb.c
index 9bd45a34a..3162574a4 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -2110,6 +2110,9 @@ SetKeySyms(ClientPtr client,
                 }
             }
         }
+        if (XkbKeyHasActions(xkb, i + req->firstKeySym))
+            XkbResizeKeyActions(xkb, i + req->firstKeySym,
+                                XkbNumGroups(wire->groupInfo) * wire->width);
         oldMap->kt_index[0] = wire->ktIndex[0];
         oldMap->kt_index[1] = wire->ktIndex[1];
         oldMap->kt_index[2] = wire->ktIndex[2];
-- 
2.34.1

openSUSE Build Service is sponsored by