From 080253c2574df9cd36c1786ffd4d9df32c8bcc49 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 17 Jun 2008 02:11:47 +0000 Subject: [PATCH] Protect against XKB being stupid. Reported by Pedro Villavicencio. * gdk/x11/gdkkeys-x11.c (_gdk_keymap_key_is_modifier): Protect against XKB being stupid. Reported by Pedro Villavicencio. svn path=/trunk/; revision=20413 --- ChangeLog | 7 +++++++ gdk/x11/gdkkeys-x11.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8fe627aa91..41b0bd5beb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-06-16 Matthias Clasen + + Bug 508751 – gnome-terminal crashed with SIGSEGV after keypress + + * gdk/x11/gdkkeys-x11.c (_gdk_keymap_key_is_modifier): Protect + against XKB being stupid. Reported by Pedro Villavicencio. + 2008-06-17 Michael Natterer * gtk/gtkplug.c (_gtk_plug_send_delete_event): use g_object_ref() diff --git a/gdk/x11/gdkkeys-x11.c b/gdk/x11/gdkkeys-x11.c index 6d654e5bf4..ee50eea1f3 100644 --- a/gdk/x11/gdkkeys-x11.c +++ b/gdk/x11/gdkkeys-x11.c @@ -1661,7 +1661,7 @@ _gdk_keymap_key_is_modifier (GdkKeymap *keymap, { XkbDescRec *xkb = get_xkb (keymap_x11); - if (xkb->map->modmap[keycode] != 0) + if (xkb->map->modmap && xkb->map->modmap[keycode] != 0) return TRUE; } else