From 72a7abb5127c7400571b73fbb4770a4de78d68ba Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Fri, 29 Oct 2010 16:22:16 -0400 Subject: [PATCH] Add upstream patch to fix exploding gnome-settings-daemon (#642454) --- ...792ee893440aa0bc31f3dc8eb2e8996715f5.patch | 36 +++++++++++++++++++ libgnomekbd.spec | 7 +++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 dd12792ee893440aa0bc31f3dc8eb2e8996715f5.patch diff --git a/dd12792ee893440aa0bc31f3dc8eb2e8996715f5.patch b/dd12792ee893440aa0bc31f3dc8eb2e8996715f5.patch new file mode 100644 index 0000000..a71c83e --- /dev/null +++ b/dd12792ee893440aa0bc31f3dc8eb2e8996715f5.patch @@ -0,0 +1,36 @@ +From dd12792ee893440aa0bc31f3dc8eb2e8996715f5 Mon Sep 17 00:00:00 2001 +From: Sergey V. Udaltsov +Date: Tue, 12 Oct 2010 09:54:04 +0000 +Subject: Fixed strv comparison function + +The initial implementation was just bad +--- +diff --git a/libgnomekbd/gkbd-keyboard-config.c b/libgnomekbd/gkbd-keyboard-config.c +index 5c48be9..6ab4885 100644 +--- a/libgnomekbd/gkbd-keyboard-config.c ++++ b/libgnomekbd/gkbd-keyboard-config.c +@@ -56,7 +56,12 @@ g_strv_equal (gchar ** l1, gchar ** l2) + { + if (l1 == l2) + return TRUE; +- while (l1 != NULL && l2 != NULL) { ++ if (l1 == NULL) ++ return g_strv_length (l2) == 0; ++ if (l2 == NULL) ++ return g_strv_length (l1) == 0; ++ ++ while ((*l1 != NULL) && (*l2 != NULL)) { + if (*l1 != *l2) { + if (*l1 && *l2) { + if (g_ascii_strcasecmp (*l1, *l2)) +@@ -68,7 +73,7 @@ g_strv_equal (gchar ** l1, gchar ** l2) + l1++; + l2++; + } +- return (*l1 && *l2); ++ return (*l1 == NULL) && (*l2 == NULL); + } + + gboolean +-- +cgit v0.8.3.1 diff --git a/libgnomekbd.spec b/libgnomekbd.spec index a07caae..f5332b5 100644 --- a/libgnomekbd.spec +++ b/libgnomekbd.spec @@ -1,6 +1,6 @@ Name: libgnomekbd Version: 2.91.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A keyboard configuration library Group: System Environment/Libraries @@ -8,6 +8,7 @@ License: LGPLv2+ URL: http://gswitchit.sourceforge.net # VCS: git:git://git.gnome.org/libgnomekbd Source0: http://download.gnome.org/sources/libgnomekbd/2.32/libgnomekbd-%{version}.tar.bz2 +Patch1: dd12792ee893440aa0bc31f3dc8eb2e8996715f5.patch BuildRequires: gtk3-devel > 2.90.0 BuildRequires: cairo-devel @@ -47,6 +48,7 @@ of the keyboard indicator applet. %prep %setup -q +%patch1 -p1 %build %configure --disable-static --enable-compile-warnings=no @@ -106,6 +108,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || : %changelog +* Fri Oct 29 2010 Bill Nottingham 2.91.1-2 +- fix crashing gnome-settings-daemon (#642454) + * Wed Oct 06 2010 Richard Hughes 2.91.1-1 - Update to 2.91.1 - Remove obsolete patches