rpms/bognor-regis/devel bognor-regis-dbus-crash.patch, NONE, 1.1 bognor-regis.spec, 1.10, 1.11
Peter Robinson
pbrobinson at fedoraproject.org
Wed Oct 7 09:43:21 UTC 2009
Author: pbrobinson
Update of /cvs/pkgs/rpms/bognor-regis/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25078
Modified Files:
bognor-regis.spec
Added Files:
bognor-regis-dbus-crash.patch
Log Message:
- Add upstream patch to fix a crash
bognor-regis-dbus-crash.patch:
br-queue.c | 40 +++++++++++++++++++++++++++++++++++-----
1 file changed, 35 insertions(+), 5 deletions(-)
--- NEW FILE bognor-regis-dbus-crash.patch ---
>From 097f778a8f5f30a539b6327c8c993703c09ef4e9 Mon Sep 17 00:00:00 2001
From: iain <iain at linux.intel.com>
Date: Thu, 13 Aug 2009 13:55:48 +0000
Subject: Fix #4911
When dbus-glib async calls return an error they do not initialise data in the
other parameters. Attempting to free or manipulate this data causes
instability. Initialise the data, and only free it when it is not an error
condition
---
diff --git a/bognor-regis/br-queue.c b/bognor-regis/br-queue.c
index 6710b41..52dca6f 100644
--- a/bognor-regis/br-queue.c
+++ b/bognor-regis/br-queue.c
@@ -431,6 +431,7 @@ async_reply (DBusGProxy *proxy,
{
if (error != NULL) {
g_warning ("Error talking to Bognor-Regis : %s", error->message);
+ g_error_free (error);
}
}
@@ -553,11 +554,18 @@ list_uris_reply (DBusGProxy *proxy,
BrQueueListUrisCallback cb;
cb = (BrQueueListUrisCallback) (data->cb);
+
+ if (error) {
+ /* Initialise the parameters correctly */
+ OUT_uris = NULL;
+ }
+
cb (data->queue, OUT_uris, error, data->userdata);
- g_strfreev (OUT_uris);
if (error) {
g_error_free (error);
+ } else {
+ g_strfreev (OUT_uris);
}
g_free (data);
@@ -595,13 +603,20 @@ get_now_playing_reply (DBusGProxy *proxy,
BrQueueGetNowPlayingCallback cb;
cb = (BrQueueGetNowPlayingCallback) (data->cb);
+
+ if (error) {
+ OUT_audio_uri = NULL;
+ OUT_visual_uri = NULL;
+ }
+
cb (data->queue, OUT_audio_uri, OUT_visual_uri, error, data->userdata);
if (error) {
g_error_free (error);
+ } else {
+ g_free (OUT_audio_uri);
+ g_free (OUT_visual_uri);
}
- g_free (OUT_audio_uri);
- g_free (OUT_visual_uri);
g_free (data);
}
@@ -638,11 +653,17 @@ get_name_reply (DBusGProxy *proxy,
BrQueueGetNameCallback cb;
cb = (BrQueueGetNameCallback) (data->cb);
+
+ if (error) {
+ OUT_name = NULL;
+ }
+
cb (data->queue, OUT_name, error, data->userdata);
- g_free (OUT_name);
if (error) {
g_error_free (error);
+ } else {
+ g_free (OUT_name);
}
g_free (data);
@@ -694,6 +715,11 @@ get_position_reply (DBusGProxy *proxy,
BrQueueGetPositionCallback cb;
cb = (BrQueueGetPositionCallback) (data->cb);
+
+ if (error) {
+ OUT_position = 0.0;
+ }
+
cb (data->queue, OUT_position, error, data->userdata);
if (error) {
@@ -735,6 +761,11 @@ get_playing_reply (DBusGProxy *proxy,
BrQueueGetPlayingCallback cb;
cb = (BrQueueGetPlayingCallback) (data->cb);
+
+ if (error) {
+ OUT_playing = FALSE;
+ }
+
cb (data->queue, OUT_playing, error, data->userdata);
if (error) {
--
cgit v0.8.2
Index: bognor-regis.spec
===================================================================
RCS file: /cvs/pkgs/rpms/bognor-regis/devel/bognor-regis.spec,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -p -r1.10 -r1.11
--- bognor-regis.spec 24 Aug 2009 16:14:58 -0000 1.10
+++ bognor-regis.spec 7 Oct 2009 09:43:20 -0000 1.11
@@ -1,13 +1,14 @@
-Name: bognor-regis
-Version: 0.4.10
-Release: 2%{?dist}
-Summary: Media daemon and play queue manager
-
-Group: Applications/Multimedia
-License: GPLv2
-URL: http://www.moblin.org/
-Source0: http://git.moblin.org/cgit.cgi/%{name}/snapshot/%{name}-%{version}.tar.bz2
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Name: bognor-regis
+Version: 0.4.10
+Release: 3%{?dist}
+Summary: Media daemon and play queue manager
+
+Group: Applications/Multimedia
+License: GPLv2
+URL: http://www.moblin.org/
+Source0: http://git.moblin.org/cgit.cgi/%{name}/snapshot/%{name}-%{version}.tar.bz2
+Patch0: bognor-regis-dbus-crash.patch
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: GConf2-devel
BuildRequires: gtk2-devel
@@ -33,6 +34,7 @@ Files for development with %{name}.
%prep
%setup -q
+%patch0 -p1 -b .dbus-crash
# Don't run configure from autogen.sh
sed -i 's|echo|exit 0|g' autogen.sh
@@ -73,6 +75,9 @@ rm -rf %{buildroot}
%{_libdir}/libbognor-regis-0.4.so
%changelog
+* Wed Oct 7 2009 Peter Robinson <pbrobinson at gmail.com> 0.4.10-3
+- Add upstream patch to fix a crash
+
* Mon Aug 24 2009 Peter Robinson <pbrobinson at gmail.com> 0.4.10-2
- Add new GConf2 build requirement
More information about the fedora-extras-commits
mailing list