Add upstream patch to fix exploding gnome-settings-daemon (#642454)

This commit is contained in:
Bill Nottingham 2010-10-29 16:22:16 -04:00
parent 028248d978
commit 72a7abb512
2 changed files with 42 additions and 1 deletions

View File

@ -0,0 +1,36 @@
From dd12792ee893440aa0bc31f3dc8eb2e8996715f5 Mon Sep 17 00:00:00 2001
From: Sergey V. Udaltsov <svu@gnome.org>
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

View File

@ -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 <notting@redhat.com> 2.91.1-2
- fix crashing gnome-settings-daemon (#642454)
* Wed Oct 06 2010 Richard Hughes <rhughes@redhat.com> 2.91.1-1
- Update to 2.91.1
- Remove obsolete patches