[gtk/gtk-3-24.ime-event.fixes] gdkevents-win32.c: Fix GDK_SETTING event notification on IME change
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-3-24.ime-event.fixes] gdkevents-win32.c: Fix GDK_SETTING event notification on IME change
- Date: Mon, 17 Dec 2018 04:44:17 +0000 (UTC)
commit 013b9cbc1f4322debd0d3040a344bc360bb7d168
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Mon Dec 10 14:47:17 2018 +0800
gdkevents-win32.c: Fix GDK_SETTING event notification on IME change
We need to call g_strdup() on the name that we pass in for notifying the
GDK_SETTING event so that when we do gdk_event_free() later we will not
get a crash (stack corruption) that results from attempting to g_free()
something that is not dynamically allocated.
gdk/win32/gdkevents-win32.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c
index a2698e3cfc..7c415377e5 100644
--- a/gdk/win32/gdkevents-win32.c
+++ b/gdk/win32/gdkevents-win32.c
@@ -2256,7 +2256,7 @@ gdk_settings_notify (GdkWindow *window,
new_event->setting.window = window;
new_event->setting.send_event = FALSE;
new_event->setting.action = action;
- new_event->setting.name = (char*) name;
+ new_event->setting.name = g_strdup (name);
_gdk_win32_append_event (new_event);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]