From 855c7028c4e7ec78bd1a8e6e9f7fe3fa200a1a72 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Fri, 9 Aug 2019 00:40:18 +0100 Subject: [PATCH] xkb core - make layotu set safer by udp before we free this should fix another possible crash vector. @fix --- src/bin/e_xkb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bin/e_xkb.c b/src/bin/e_xkb.c index 8eeeb9dff..493610d36 100644 --- a/src/bin/e_xkb.c +++ b/src/bin/e_xkb.c @@ -435,8 +435,9 @@ e_xkb_layout_set(const E_Config_XKB_Layout *cl) EINA_SAFETY_ON_NULL_RETURN(cl); if (e_config->xkb.dont_touch_my_damn_keyboard) return; if (e_config_xkb_layout_eq(e_config->xkb.current_layout, cl)) return; + cl2 = e_config_xkb_layout_dup(e_config->xkb.current_layout); e_config_xkb_layout_free(e_config->xkb.current_layout); - e_config->xkb.current_layout = e_config_xkb_layout_dup(cl); + e_config->xkb.current_layout = cl2; EINA_LIST_FOREACH(e_config->xkb.used_layouts, l, cl2) { cur_group++;