diff --git a/caribou.spec b/caribou.spec index bf78e0a..c9f3087 100644 --- a/caribou.spec +++ b/caribou.spec @@ -2,13 +2,15 @@ Name: caribou Version: 0.4.18.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A simplified in-place on-screen keyboard License: LGPLv2+ URL: http://live.gnome.org/Caribou Source0: http://download.gnome.org/sources/caribou/0.4/caribou-%{version}.tar.xz Patch0: caribou-0.4.17-multilib.patch Patch1: caribou-0.4.17-fix-python-exec.patch +# upstream patch https://bugzilla.gnome.org/show_bug.cgi?id=756194 +Patch2: xadapter-Avoid-a-crash-when-Xkl-doesnt-know-the-re.patch BuildRequires: python2-devel BuildRequires: gtk2-devel @@ -111,6 +113,7 @@ non-gnome-shell sessions. %setup -q %patch0 -p1 -b .multilib %patch1 -p1 -b .fix-python-exec +%patch2 -p1 -b .xkl %build %configure --disable-static @@ -194,6 +197,9 @@ fi %changelog +* Fri Oct 09 2015 Parag Nemade - 0.4.18.1-3 +- Resolves:rh#1228935: gnome-shell: strlen(): gnome-shell killed by SIGSEGV + * Wed Jun 17 2015 Fedora Release Engineering - 0.4.18.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild diff --git a/xadapter-Avoid-a-crash-when-Xkl-doesnt-know-the-re.patch b/xadapter-Avoid-a-crash-when-Xkl-doesnt-know-the-re.patch new file mode 100644 index 0000000..c9235ba --- /dev/null +++ b/xadapter-Avoid-a-crash-when-Xkl-doesnt-know-the-re.patch @@ -0,0 +1,48 @@ +From 5535de3543fdbf8f82931e5346dacc1ecc77b3a8 Mon Sep 17 00:00:00 2001 +From: Rui Matos +Date: Wed, 7 Oct 2015 17:53:03 +0200 +Subject: [PATCH] xadapter: Avoid a crash when Xkl doesn't know the real xkb + groups + +Xkl.ConfigRec gets its layouts and variants from the _XKB_RULES_NAMES +root window property which isn't specified anywhere and in fact +doesn't get set under Xwayland. The group index though is accurate +which means that we might end up trying to access an invalid index on +the layouts or variants array and crashing. + +Avoid this by just lying to the caller since we can't obtain the real +layout/variant names in that case. Since this only happens under +Xwayland and in that case the only consumer of this API is gnome-shell +which ends up not using the names, this should be safe. + +https://bugzilla.gnome.org/show_bug.cgi?id=756194 +--- + libcaribou/xadapter.vala | 13 +++++++++++-- + 1 file changed, 11 insertions(+), 2 deletions(-) + +diff --git a/libcaribou/xadapter.vala b/libcaribou/xadapter.vala +index e786c66..22858b7 100644 +--- a/libcaribou/xadapter.vala ++++ b/libcaribou/xadapter.vala +@@ -301,8 +301,17 @@ namespace Caribou { + out string variant_name) { + Xkl.ConfigRec config_rec = new Xkl.ConfigRec (); + config_rec.get_from_server (this.xkl_engine); +- group_name = config_rec.layouts[this.group]; +- variant_name = config_rec.variants[this.group]; ++ ++ if (this.group < config_rec.layouts.length) ++ group_name = config_rec.layouts[this.group]; ++ else ++ group_name = ""; ++ ++ if (this.group < config_rec.variants.length) ++ variant_name = config_rec.variants[this.group]; ++ else ++ variant_name = ""; ++ + if (variant_name == null) + variant_name = ""; + +-- +2.4.3 \ No newline at end of file