[evince/f14/master] Fix crash in clear_job_selection()

mkasik mkasik at fedoraproject.org
Mon Nov 22 13:02:48 UTC 2010


commit 3876e26b5b53846af9ce61775a6b05befc49c8a2
Author: Marek Kasik <mkasik at redhat.com>
Date:   Mon Nov 22 13:58:33 2010 +0100

    Fix crash in clear_job_selection()
    
    Remove unused patch
    Resolves: #647689

 evince-2.31.92-default-page-scaling.patch |   26 -----------------------
 evince-page-range.patch                   |   32 +++++++++++++++++++++++++++++
 evince.spec                               |   10 ++++++++-
 3 files changed, 41 insertions(+), 27 deletions(-)
---
diff --git a/evince-page-range.patch b/evince-page-range.patch
new file mode 100644
index 0000000..65d0775
--- /dev/null
+++ b/evince-page-range.patch
@@ -0,0 +1,32 @@
+commit a3b87cb28e46958b37e384a47604032ea0889807
+Author: Carlos Garcia Campos <carlosgc at gnome.org>
+Date:   Sun Nov 21 12:27:21 2010 +0100
+
+    libview: Make sure we have a valid page range before getting/setting selection list
+    
+    Fixes bug #630999.
+
+diff --git a/libview/ev-pixbuf-cache.c b/libview/ev-pixbuf-cache.c
+index 367f70d..ee68354 100644
+--- a/libview/ev-pixbuf-cache.c
++++ b/libview/ev-pixbuf-cache.c
+@@ -1035,6 +1035,9 @@ ev_pixbuf_cache_set_selection_list (EvPixbufCache *pixbuf_cache,
+ 	if (!EV_IS_SELECTION (pixbuf_cache->document))
+ 		return;
+ 
++        if (pixbuf_cache->start_page == -1 || pixbuf_cache->end_page == -1)
++                return;
++
+ 	/* We check each area to see what needs updating, and what needs freeing; */
+ 	page = pixbuf_cache->start_page - pixbuf_cache->preload_cache_size;
+ 	for (i = 0; i < pixbuf_cache->preload_cache_size; i++) {
+@@ -1114,6 +1117,9 @@ ev_pixbuf_cache_get_selection_list (EvPixbufCache *pixbuf_cache)
+ 
+ 	g_return_val_if_fail (EV_IS_PIXBUF_CACHE (pixbuf_cache), NULL);
+ 
++        if (pixbuf_cache->start_page == -1 || pixbuf_cache->end_page == -1)
++                return NULL;
++
+ 	/* We check each area to see what needs updating, and what needs freeing; */
+ 	page = pixbuf_cache->start_page - pixbuf_cache->preload_cache_size;
+ 	for (i = 0; i < pixbuf_cache->preload_cache_size; i++) {
diff --git a/evince.spec b/evince.spec
index 6540175..a98f4c2 100644
--- a/evince.spec
+++ b/evince.spec
@@ -5,7 +5,7 @@
 
 Name:           evince
 Version:        2.32.0
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Document viewer
 
 License:        GPLv2+ and GFDL
@@ -14,6 +14,8 @@ URL:            http://projects.gnome.org/evince/
 Source0:        http://download.gnome.org/sources/%{name}/2.32/%{name}-%{version}.tar.bz2
 # https://bugzilla.redhat.com/show_bug.cgi?id=562648
 Patch2:         evince-t1font-mapping.patch
+# https://bugzilla.redhat.com/show_bug.cgi?id=647689
+Patch3:         evince-page-range.patch
 
 BuildRequires:  gtk2-devel
 BuildRequires:  glib2-devel >= %{glib2_version}
@@ -105,6 +107,7 @@ It adds an additional tab called "Document" to the file properties dialog.
 %prep
 %setup -q
 %patch2 -p1 -b .t1font-map
+%patch3 -p1 -b .page-range
 
 %build
 %configure \
@@ -238,6 +241,11 @@ glib-compile-schemas --allow-any-name %{_datadir}/glib-2.0/schemas ||:
 %{_libdir}/nautilus/extensions-2.0/libevince-properties-page.so
 
 %changelog
+* Mon Nov 22 2010 Marek Kasik <mkasik at redhat.com> - 2.32.0-2
+- Fix crash in clear_job_selection()
+- Remove unused patch
+- Resolves: #647689
+
 * Wed Sep 29 2010 Matthias Clasen <mclasen at redhat.com> - 2.32.0-1
 - Update to 2.32.0
 


More information about the scm-commits mailing list