gdaemonfileenumerator: Fix crashes in synchronous enumerator code

https://bugzilla.redhat.com/show_bug.cgi?id=1472819
This commit is contained in:
Ondrej Holy 2017-07-24 14:26:22 +02:00
parent f4c919ac3a
commit d173b3941e
2 changed files with 65 additions and 1 deletions

View File

@ -0,0 +1,57 @@
From c155704092c1848a42539ab91cad9052c38e62af Mon Sep 17 00:00:00 2001
From: Ondrej Holy <oholy@redhat.com>
Date: Mon, 24 Jul 2017 12:00:09 +0200
Subject: [PATCH] gdaemonfileenumerator: Fix crashes in synchronous enumerator
code
Commit 2eae108 ported the code to GTask and slightly changed processing.
The changes trigger the following criticals and cause crashes of some
applications (e.g. Firefox, Thunderbird).
GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Return TRUE from signal handlers in order to prevent further processing
of the invocations, which cause the mentioned issues.
https://bugzilla.gnome.org/show_bug.cgi?id=784953
---
client/gdaemonfileenumerator.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/client/gdaemonfileenumerator.c b/client/gdaemonfileenumerator.c
index aa30ee24..f3ba336b 100644
--- a/client/gdaemonfileenumerator.c
+++ b/client/gdaemonfileenumerator.c
@@ -194,7 +194,7 @@ next_files_sync_check (GDaemonFileEnumerator *enumerator)
g_mutex_unlock (&enumerator->next_files_mutex);
}
-static void
+static gboolean
handle_done (GVfsDBusEnumerator *object,
GDBusMethodInvocation *invocation,
gpointer user_data)
@@ -209,9 +209,11 @@ handle_done (GVfsDBusEnumerator *object,
g_signal_emit (enumerator, signals[CHANGED], 0);
gvfs_dbus_enumerator_complete_done (object, invocation);
+
+ return TRUE;
}
-static void
+static gboolean
handle_got_info (GVfsDBusEnumerator *object,
GDBusMethodInvocation *invocation,
GVariant *arg_infos,
@@ -248,6 +250,8 @@ handle_got_info (GVfsDBusEnumerator *object,
g_signal_emit (enumerator, signals[CHANGED], 0);
gvfs_dbus_enumerator_complete_got_info (object, invocation);
+
+ return TRUE;
}
static void
--
2.13.3

View File

@ -22,7 +22,7 @@
Name: gvfs
Version: 1.33.3
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Backends for the gio framework in GLib
License: GPLv3 and LGPLv2+ and BSD and MPLv2.0
@ -35,6 +35,9 @@ Patch0: gvfs-archive-integration.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1461066
Patch1: goa-Fix-password-based-authentication.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1472819
Patch2: gdaemonfileenumerator-Fix-crashes-in-synchronous-e.patch
BuildRequires: pkgconfig
BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version}
BuildRequires: pkgconfig(dbus-glib-1)
@ -218,6 +221,7 @@ the functionality of the installed gvfs package.
%setup -q
%patch0 -p1 -b .archive-integration
%patch1 -p1 -b .goa-Fix-password-based-authentication
%patch2 -p1 -b .gdaemonfileenumerator-Fix-crashes-in-synchronous-e
# Needed for gvfs-0.2.1-archive-integration.patch
autoreconf -fi
@ -411,6 +415,9 @@ killall -USR1 gvfsd >&/dev/null || :
%{_datadir}/installed-tests
%changelog
* Mon Jul 24 2017 Ondrej Holy <oholy@redhat.com> - 1.33.3-3
- gdaemonfileenumerator: Fix crashes in synchronous enumerator code (rhbz#1472819)
* Wed Jul 19 2017 Ondrej Holy <oholy@redhat.com> - 1.33.3-2
- goa: Fix password-based authentication (rhbz#1461066)