[gnome-settings-daemon/f13/master] - Don't crash if we don't recognise the copy/paste buffer content (#624380)
Bastien Nocera
hadess at fedoraproject.org
Thu Sep 23 16:37:25 UTC 2010
commit 266787ca71d0f13c3197b8487851c792636834c3
Author: Bastien Nocera <hadess at hadess.net>
Date: Thu Sep 23 17:37:24 2010 +0100
- Don't crash if we don't recognise the copy/paste buffer content (#624380)
...er-XGetWindowProperty-returns-no-items-an.patch | 30 ++++++++++++++++++++
gnome-settings-daemon.spec | 10 ++++++-
2 files changed, 39 insertions(+), 1 deletions(-)
---
diff --git a/0001-Check-whether-XGetWindowProperty-returns-no-items-an.patch b/0001-Check-whether-XGetWindowProperty-returns-no-items-an.patch
new file mode 100644
index 0000000..9901483
--- /dev/null
+++ b/0001-Check-whether-XGetWindowProperty-returns-no-items-an.patch
@@ -0,0 +1,30 @@
+From b7a9fd528253af16456cf7c0dc1f48bfd0dcbfbc Mon Sep 17 00:00:00 2001
+From: Krzysztof Klimonda <kklimonda at ubuntu.com>
+Date: Wed, 15 Sep 2010 12:29:17 +0200
+Subject: [PATCH] Check whether XGetWindowProperty returns no items, and return if so.
+
+Fixes https://bugzilla.gnome.org/show_bug.cgi?id=628526
+---
+ plugins/clipboard/gsd-clipboard-manager.c | 5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+diff --git a/plugins/clipboard/gsd-clipboard-manager.c b/plugins/clipboard/gsd-clipboard-manager.c
+index f8cb7ec..d0d28c3 100644
+--- a/plugins/clipboard/gsd-clipboard-manager.c
++++ b/plugins/clipboard/gsd-clipboard-manager.c
+@@ -599,8 +599,11 @@ convert_clipboard (GsdClipboardManager *manager,
+ &type, &format, &nitems, &remaining,
+ (unsigned char **) &multiple);
+
+- if (type != XA_ATOM_PAIR)
++ if (type != XA_ATOM_PAIR || nitems == 0) {
++ if (multiple)
++ free (multiple);
+ return;
++ }
+
+ for (i = 0; i < nitems; i += 2) {
+ rdata = (IncrConversion *) malloc (sizeof (IncrConversion));
+--
+1.7.2.3
+
diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec
index e10b1a2..0b3e03f 100644
--- a/gnome-settings-daemon.spec
+++ b/gnome-settings-daemon.spec
@@ -1,6 +1,6 @@
Name: gnome-settings-daemon
Version: 2.30.1
-Release: 7%{?dist}
+Release: 8%{?dist}
Summary: The daemon sharing settings from GNOME to GTK+/KDE applications
Group: System Environment/Daemons
@@ -35,6 +35,10 @@ BuildRequires: gettext intltool
BuildRequires: fontconfig-devel
BuildRequires: libcanberra-devel
+# https://bugzilla.gnome.org/show_bug.cgi?id=628526
+# https://bugzilla.redhat.com/show_bug.cgi?id=624380
+Patch0: 0001-Check-whether-XGetWindowProperty-returns-no-items-an.patch
+
# change font rendering
Patch3: slight-hinting.patch
@@ -58,6 +62,7 @@ developing applications that use %{name}.
%prep
%setup -q
+%patch0 -p1 -b .copy-crasher
%patch3 -p1 -b .slight-hinting
%patch4 -p1 -b .keyboard-icon
@@ -128,6 +133,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || :
%{_libdir}/pkgconfig/gnome-settings-daemon.pc
%changelog
+* Thu Sep 23 2010 Bastien Nocera <bnocera at redhat.com> 2.30.1-8
+- Don't crash if we don't recognise the copy/paste buffer content (#624380)
+
* Mon Jun 28 2010 Bastien Nocera <bnocera at redhat.com> 2.30.1-7
- Don't remove the sound plugin if we want the samples to be dropped
when needed
More information about the scm-commits
mailing list