summaryrefslogtreecommitdiffstats
path: root/main/evince/evince-2.32.0-libview-crash.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-04-20 09:31:37 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-04-20 09:31:37 +0000
commite4600af202ef9c999df7769e245960248d4d7e59 (patch)
treefc76ad84f268f81b772a4c12b5498e6ae3be4295 /main/evince/evince-2.32.0-libview-crash.patch
parentf887c908054f17aefd95dc5b3a2338276d974ae8 (diff)
downloadaports-e4600af202ef9c999df7769e245960248d4d7e59.tar.bz2
aports-e4600af202ef9c999df7769e245960248d4d7e59.tar.xz
main/evince: enable tiff backend and fix various issues
most patches are taken frrom gentoo
Diffstat (limited to 'main/evince/evince-2.32.0-libview-crash.patch')
-rw-r--r--main/evince/evince-2.32.0-libview-crash.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/main/evince/evince-2.32.0-libview-crash.patch b/main/evince/evince-2.32.0-libview-crash.patch
new file mode 100644
index 000000000..65d07751f
--- /dev/null
+++ b/main/evince/evince-2.32.0-libview-crash.patch
@@ -0,0 +1,32 @@
+commit a3b87cb28e46958b37e384a47604032ea0889807
+Author: Carlos Garcia Campos <carlosgc@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++) {