Bug#825226: jessie-pu: package evince/3.14.1-2+deb8u1

2016-05-25 Thread Adam D. Barratt
Control: tags -1 + pending

On Tue, 2016-05-24 at 21:24 +0100, Adam D. Barratt wrote:
> Control: tags -1 + confirmed
> 
> On Tue, 2016-05-24 at 14:31 -0500, Jason Crain wrote:
> > I would like to patch a couple of bugs in the stable release of evince.
> > 
> > * reload-page-count.patch.  Fix crash when document has pages removed and
> > is reloaded.  Update the end page index when the document is reloaded
> > (Closes: #805276).  This effects people who use evince as a previewer while
> > working in latex or a similar typesetter.
> > 
> > * check-load-job-success.patch.  Fix crash in recent documents view when
> > a recent document fails to load.  Check whether a document's load job failed
> > before creating it's thumbnail (Closes: #762719).  It's possible to get 
> > into a
> > situation where evince is unusable because you've recently viewed a password
> > protected PDF.  Evince is unable to create a thumbnail for the PDF and 
> > crashes
> > on startup.
> 
> ++/* When a document is reloaded, it may have less pages.
> 
> *cough* fewer *cough* (I realise this is a direct copy of the upstream
> patch, so it's fine to leave as is).
> 
> Please go ahead.

Uploaded and flagged for acceptance.

Regards,

Adam



Bug#825226: jessie-pu: package evince/3.14.1-2+deb8u1

2016-05-24 Thread Adam D. Barratt
Control: tags -1 + confirmed

On Tue, 2016-05-24 at 14:31 -0500, Jason Crain wrote:
> I would like to patch a couple of bugs in the stable release of evince.
> 
> * reload-page-count.patch.  Fix crash when document has pages removed and
> is reloaded.  Update the end page index when the document is reloaded
> (Closes: #805276).  This effects people who use evince as a previewer while
> working in latex or a similar typesetter.
> 
> * check-load-job-success.patch.  Fix crash in recent documents view when
> a recent document fails to load.  Check whether a document's load job failed
> before creating it's thumbnail (Closes: #762719).  It's possible to get into a
> situation where evince is unusable because you've recently viewed a password
> protected PDF.  Evince is unable to create a thumbnail for the PDF and crashes
> on startup.

++/* When a document is reloaded, it may have less pages.

*cough* fewer *cough* (I realise this is a direct copy of the upstream
patch, so it's fine to leave as is).

Please go ahead.

Regards,

Adam



Bug#825226: jessie-pu: package evince/3.14.1-2+deb8u1

2016-05-24 Thread Jason Crain
Package: release.debian.org
Severity: normal
Tags: jessie
User: release.debian@packages.debian.org
Usertags: pu

I would like to patch a couple of bugs in the stable release of evince.

* reload-page-count.patch.  Fix crash when document has pages removed and
is reloaded.  Update the end page index when the document is reloaded
(Closes: #805276).  This effects people who use evince as a previewer while
working in latex or a similar typesetter.

* check-load-job-success.patch.  Fix crash in recent documents view when
a recent document fails to load.  Check whether a document's load job failed
before creating it's thumbnail (Closes: #762719).  It's possible to get into a
situation where evince is unusable because you've recently viewed a password
protected PDF.  Evince is unable to create a thumbnail for the PDF and crashes
on startup.

debdiff is attached
diff -Nru evince-3.14.1/debian/changelog evince-3.14.1/debian/changelog
--- evince-3.14.1/debian/changelog  2015-03-06 02:36:49.0 -0600
+++ evince-3.14.1/debian/changelog  2016-05-19 13:40:51.0 -0500
@@ -1,3 +1,14 @@
+evince (3.14.1-2+deb8u1) stable; urgency=medium
+
+  * Add reload-page-count.patch.  Fix crash when document has pages removed and
+is reloaded.  Update the end page index when the document is reloaded.
+(Closes: #805276)
+  * Add check-load-job-success.patch.  Fix crash in recent documents view when
+a recent document fails to load.  Check whether a document's load job
+failed before creating it's thumbnail.  (Closes: #762719)
+
+ -- Jason Crain   Thu, 19 May 2016 13:03:32 -0500
+
 evince (3.14.1-2) unstable; urgency=medium
 
   * Team upload.
diff -Nru evince-3.14.1/debian/patches/check-load-job-success.patch 
evince-3.14.1/debian/patches/check-load-job-success.patch
--- evince-3.14.1/debian/patches/check-load-job-success.patch   1969-12-31 
18:00:00.0 -0600
+++ evince-3.14.1/debian/patches/check-load-job-success.patch   2016-05-19 
13:40:50.0 -0500
@@ -0,0 +1,23 @@
+Description: Check whether load job succeeded
+ Check whether document load job succeeded before creating it's thumbnail.
+ This fixes a crash in the recent documents view when a document fails to load.
+Origin: upstream, 
https://git.gnome.org/browse/evince/commit/?id=921211ea2dfcff79df172e39a380074883e2b1a2
+Author: Marek Kasik 
+Bug: https://bugzilla.gnome.org/744049
+Bug-Debian: https://bugs.debian.org/762719
+Last-Update: 2016-05-19
+
+Index: evince-3.14.1/shell/ev-recent-view.c
+===
+--- evince-3.14.1.orig/shell/ev-recent-view.c
 evince-3.14.1/shell/ev-recent-view.c
+@@ -366,7 +366,8 @@ document_load_job_completed_callback (Ev
+ 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;
+ }
diff -Nru evince-3.14.1/debian/patches/reload-page-count.patch 
evince-3.14.1/debian/patches/reload-page-count.patch
--- evince-3.14.1/debian/patches/reload-page-count.patch1969-12-31 
18:00:00.0 -0600
+++ evince-3.14.1/debian/patches/reload-page-count.patch2016-05-19 
13:40:44.0 -0500
@@ -0,0 +1,29 @@
+Description: Check legal boundaries of accessable pages
+ Keep the accessible view end page under the limits of the document.  Sometimes
+ when a document is reloaded, it may have fewer pages making the end page
+ higher than the actual number of pages.
+Origin: backport, 
https://git.gnome.org/browse/evince/commit/?id=e6e0d29d9fed63599e736003f06428a1aea87121
+Author: Germán Poo-Caamaño 
+Bug: https://bugzilla.gnome.org/735744
+Bug-Debian: https://bugs.debian.org/805276
+Last-Update: 2016-05-17
+
+Index: evince-3.14.1/libview/ev-view-accessible.c
+===
+--- evince-3.14.1.orig/libview/ev-view-accessible.c
 evince-3.14.1/libview/ev-view-accessible.c
+@@ -389,6 +389,14 @@ initialize_children (EvViewAccessible *s
+   child = ev_page_accessible_new (self, i);
+   g_ptr_array_add (self->priv->children, child);
+   }
++
++/* When a document is reloaded, it may have less pages.
++ * We need to update the end page accordingly to avoid
++ * invalid access to self->priv->children
++ * See https://bugzilla.gnome.org/show_bug.cgi?id=735744
++ */
++  if (self->priv->end_page >= n_pages)
++  self->priv->end_page = n_pages - 1;
+ }
+ 
+ static void
diff -Nru evince-3.14.1/debian/patches/series 
evince-3.14.1/debian/patches/series
--- evince-3.14.1/debian/patches/series