From 4d4b59ee3c49d4c3ed9bb5326c2438e647082e16 Mon Sep 17 00:00:00 2001 From: Martin Hatina Date: Mon, 22 Jun 2015 11:13:03 +0200 Subject: [PATCH] Avoid crash after reloading document Resolves: #1203277 --- evince-3.14.2-check-to-avoid-crash.patch | 13 +++++++++++++ evince.spec | 8 +++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 evince-3.14.2-check-to-avoid-crash.patch diff --git a/evince-3.14.2-check-to-avoid-crash.patch b/evince-3.14.2-check-to-avoid-crash.patch new file mode 100644 index 0000000..3d1b8ef --- /dev/null +++ b/evince-3.14.2-check-to-avoid-crash.patch @@ -0,0 +1,13 @@ +diff --git a/libview/ev-view-accessible.c b/libview/ev-view-accessible.c +index 7805219..c871ff9 100644 +--- a/libview/ev-view-accessible.c ++++ b/libview/ev-view-accessible.c +@@ -578,7 +578,7 @@ ev_view_accessible_set_page_range (EvViewAccessible *accessible, + g_return_if_fail (EV_IS_VIEW_ACCESSIBLE (accessible)); + + for (i = accessible->priv->start_page; i <= accessible->priv->end_page; i++) { +- if (i < start || i > end) { ++ if ((i < start || i > end) && i < ev_view_accessible_get_n_pages (accessible)) { + page = g_ptr_array_index (accessible->priv->children, i); + atk_object_notify_state_change (page, ATK_STATE_SHOWING, FALSE); + } diff --git a/evince.spec b/evince.spec index 493aa86..a68e3b2 100644 --- a/evince.spec +++ b/evince.spec @@ -5,7 +5,7 @@ Name: evince Version: 3.14.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Document viewer License: GPLv2+ and GPLv3+ and LGPLv2+ and MIT and Afmparse @@ -13,6 +13,7 @@ Group: Applications/Publishing URL: http://projects.gnome.org/evince/ Source0: http://download.gnome.org/sources/%{name}/3.14/%{name}-%{version}.tar.xz Patch0: 0001-Check-for-failed-rendering-jobs.patch +Patch1: evince-3.14.2-check-to-avoid-crash.patch BuildRequires: glib2-devel >= %{glib2_version} BuildRequires: gtk3-devel >= %{gtk3_version} @@ -123,6 +124,7 @@ This package contains the evince web browser plugin. %prep %setup -q %patch0 -p1 -b .render-fail +%patch1 -p1 -b .check-to-avoid-crash %build ./autogen.sh @@ -256,6 +258,10 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas >&/dev/null ||: %{_libdir}/mozilla/plugins/libevbrowserplugin.so %changelog +* Mon Jun 22 2015 Martin Hatina - 3.14.2-3 +- Avoid crash after reloading document +- Resolves: #1203277 + * Mon Mar 16 2015 Marek Kasik - 3.14.2-2 - Fix crashes caused by corrupted documents - Related: #1201996