[evince/f21] Check whether load job succeeded

mkasik mkasik at fedoraproject.org
Mon Feb 16 10:49:06 UTC 2015


commit c8b900f36988b4fddb0fa532265a7ad70b86746d
Author: Marek Kasik <mkasik at redhat.com>
Date:   Mon Feb 16 11:48:43 2015 +0100

    Check whether load job succeeded
    
    Resolves: #1189222

 ...ent-view-Check-whether-load-job-succeeded.patch |   32 ++++++++++++++++++++
 evince.spec                                        |   10 +++++-
 2 files changed, 41 insertions(+), 1 deletions(-)
---
diff --git a/0001-recent-view-Check-whether-load-job-succeeded.patch b/0001-recent-view-Check-whether-load-job-succeeded.patch
new file mode 100644
index 0000000..add7f9e
--- /dev/null
+++ b/0001-recent-view-Check-whether-load-job-succeeded.patch
@@ -0,0 +1,32 @@
+From afc1a86c2d706ae2ea4866581ba2522288a4437f Mon Sep 17 00:00:00 2001
+From: Marek Kasik <mkasik at redhat.com>
+Date: Wed, 11 Feb 2015 11:52:09 +0100
+Subject: [PATCH 1/9] recent-view: Check whether load job succeeded
+
+Check whether document load job succeeded before proceeding its metadata.
+This fixes crash when there are no recent files and you are trying to open
+password protected PDF file
+(see https://bugzilla.redhat.com/show_bug.cgi?id=1189222).
+
+https://bugzilla.gnome.org/show_bug.cgi?id=744049
+---
+ shell/ev-recent-view.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/shell/ev-recent-view.c b/shell/ev-recent-view.c
+index fb0004c..facea47 100644
+--- a/shell/ev-recent-view.c
++++ b/shell/ev-recent-view.c
+@@ -366,7 +366,8 @@ document_load_job_completed_callback (EvJobLoad                *job_load,
+         EvRecentViewPrivate *priv = data->ev_recent_view->priv;
+         EvDocument          *document = EV_JOB (job_load)->document;
+ 
+-        if (g_cancellable_is_cancelled (data->cancellable) || !document) {
++        if (g_cancellable_is_cancelled (data->cancellable) ||
++            ev_job_is_failed (EV_JOB (job_load))) {
+                 get_document_info_async_data_free (data);
+                 return;
+         }
+-- 
+2.1.0
+
diff --git a/evince.spec b/evince.spec
index a3d1496..2f15e83 100644
--- a/evince.spec
+++ b/evince.spec
@@ -5,7 +5,7 @@
 
 Name:           evince
 Version:        3.14.1
-Release:        8%{?dist}
+Release:        9%{?dist}
 Summary:        Document viewer
 
 License:        GPLv2+ and GPLv3+ and LGPLv2+ and MIT and Afmparse
@@ -28,6 +28,9 @@ Patch4:         0001-Fix-configuration-with-ligbnome-desktop.patch
 # https://bugzilla.redhat.com/show_bug.cgi?id=1173832
 Patch5:         0001-print-operation-Fix-centering-of-documents-when-prin.patch
 
+# https://bugzilla.redhat.com/show_bug.cgi?id=1189222
+Patch6:         0001-recent-view-Check-whether-load-job-succeeded.patch
+
 BuildRequires:  glib2-devel >= %{glib2_version}
 BuildRequires:  gtk3-devel >= %{gtk3_version}
 BuildRequires:  poppler-glib-devel >= %{poppler_version}
@@ -143,6 +146,7 @@ This package contains the evince web browser plugin.
 %patch3 -p1 -b .scroll-to-search-result2
 %patch4 -p1 -b .libgnome-desktop
 %patch5 -p1 -R -b .centering-of-printing
+%patch6 -p1 -b .load-job
 
 %build
 ./autogen.sh
@@ -276,6 +280,10 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas >&/dev/null ||:
 %{_libdir}/mozilla/plugins/libevbrowserplugin.so
 
 %changelog
+* Mon Feb 16 2015 Marek Kasik <mkasik at redhat.com> - 3.14.1-9
+- Check whether document load job succeeded before proceeding its metadata.
+- Resolves: #1189222
+
 * Tue Jan 20 2015 Marek Kasik <mkasik at redhat.com> - 3.14.1-8
 - Revert fix of centering of documents when printing with a manual scale.
 - This caused problems with printing of landscape documents.


More information about the scm-commits mailing list