Update to 3.32.1

This commit is contained in:
Kalev Lember 2019-09-29 20:22:32 +02:00
parent 564a1a0710
commit 386f050fe9
5 changed files with 7 additions and 111 deletions

1
.gitignore vendored
View File

@ -81,3 +81,4 @@ evince-3.0.0.tar.bz2
/evince-3.31.90.tar.xz
/evince-3.31.91.tar.xz
/evince-3.32.0.tar.xz
/evince-3.32.1.tar.xz

View File

@ -1,30 +0,0 @@
From ed0241a5307e83484e25c01a8027504ea4dc35f3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nelson=20Ben=C3=ADtez=20Le=C3=B3n?= <nbenitezl@gmail.com>
Date: Thu, 21 Mar 2019 22:25:00 -0400
Subject: [PATCH] sidebar links: protect against NULL var reaching strcmp()
Protect against a valid case of index_expand being NULL,
by adding a NULL check prior to checking for empty string
with strcmp().
Fixes #1113
---
shell/ev-sidebar-links.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/shell/ev-sidebar-links.c b/shell/ev-sidebar-links.c
index 8955d19c..29d3997e 100644
--- a/shell/ev-sidebar-links.c
+++ b/shell/ev-sidebar-links.c
@@ -518,7 +518,7 @@ row_collapsed_cb (GtkTreeView *tree_view,
if (ev_metadata_get_string (metadata, "index-collapse", &index_collapse)) {
/* If collapsed row is not in 'index_collapse' we add it. */
if (g_strstr_len (index_collapse, -1, path_token) == NULL) {
- if (!strcmp (index_expand, ""))
+ if (!index_expand || !strcmp (index_expand, ""))
new_index = g_strconcat (index_collapse, path_token, NULL);
else
new_index = g_strconcat (index_collapse, path_token + 1, NULL);
--
2.20.1

View File

@ -1,72 +0,0 @@
From 3e38d5ad724a042eebadcba8c2d57b0f48b7a8c7 Mon Sep 17 00:00:00 2001
From: Jason Crain <jcrain@src.gnome.org>
Date: Mon, 15 Apr 2019 23:06:36 -0600
Subject: [PATCH] tiff: Handle failure from TIFFReadRGBAImageOriented
The TIFFReadRGBAImageOriented function returns zero if it was unable to
read the image. Return NULL in this case instead of displaying
uninitialized memory.
Fixes #1129
---
backend/tiff/tiff-document.c | 28 ++++++++++++++++++----------
1 file changed, 18 insertions(+), 10 deletions(-)
diff --git a/backend/tiff/tiff-document.c b/backend/tiff/tiff-document.c
index 7715031b..38bb3bd8 100644
--- a/backend/tiff/tiff-document.c
+++ b/backend/tiff/tiff-document.c
@@ -292,18 +292,22 @@ tiff_document_render (EvDocument *document,
g_warning("Failed to allocate memory for rendering.");
return NULL;
}
-
+
+ if (!TIFFReadRGBAImageOriented (tiff_document->tiff,
+ width, height,
+ (uint32 *)pixels,
+ orientation, 0)) {
+ g_warning ("Failed to read TIFF image.");
+ g_free (pixels);
+ return NULL;
+ }
+
surface = cairo_image_surface_create_for_data (pixels,
CAIRO_FORMAT_RGB24,
width, height,
rowstride);
cairo_surface_set_user_data (surface, &key,
pixels, (cairo_destroy_func_t)g_free);
-
- TIFFReadRGBAImageOriented (tiff_document->tiff,
- width, height,
- (uint32 *)pixels,
- orientation, 0);
pop_handlers ();
/* Convert the format returned by libtiff to
@@ -384,13 +388,17 @@ tiff_document_get_thumbnail (EvDocument *document,
if (!pixels)
return NULL;
+ if (!TIFFReadRGBAImageOriented (tiff_document->tiff,
+ width, height,
+ (uint32 *)pixels,
+ ORIENTATION_TOPLEFT, 0)) {
+ g_free (pixels);
+ return NULL;
+ }
+
pixbuf = gdk_pixbuf_new_from_data (pixels, GDK_COLORSPACE_RGB, TRUE, 8,
width, height, rowstride,
(GdkPixbufDestroyNotify) g_free, NULL);
- TIFFReadRGBAImageOriented (tiff_document->tiff,
- width, height,
- (uint32 *)pixels,
- ORIENTATION_TOPLEFT, 0);
pop_handlers ();
ev_render_context_compute_scaled_size (rc, width, height * (x_res / y_res),
--
2.21.0

View File

@ -5,8 +5,8 @@
%global synctex_version 1.19
Name: evince
Version: 3.32.0
Release: 3%{?dist}
Version: 3.32.1
Release: 1%{?dist}
Summary: Document viewer
License: GPLv2+ and GPLv3+ and LGPLv2+ and MIT and Afmparse
@ -16,12 +16,6 @@ Source0: https://download.gnome.org/sources/%{name}/3.32/%{name}-%{versio
# https://bugzilla.gnome.org/show_bug.cgi?id=766749
Patch3: 0001-Resolves-deb-762530-rhbz-1061177-add-man-pages.patch
# https://bugzilla.gnome.org/show_bug.cgi?id=1706198
Patch4: 0001-sidebar-links-protect-against-NULL-var-reaching-strc.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1716295
Patch5: 0001-tiff-Handle-failure-from-TIFFReadRGBAImageOriented.patch
BuildRequires: gcc-c++
BuildRequires: gcc
BuildRequires: gettext-devel
@ -265,6 +259,9 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/org.gnome.Evince-p
%endif
%changelog
* Sun Sep 29 2019 Kalev Lember <klember@redhat.com> - 3.32.1-1
- Update to 3.32.1
* Tue Jun 11 2019 Marek Kasik <mkasik@redhat.com> - 3.32.0-3
- Handle failure from TIFFReadRGBAImageOriented
- Resolves: #1716299

View File

@ -1 +1 @@
SHA512 (evince-3.32.0.tar.xz) = 565298a200d9ae2f6b4cb53c3cba0d0d0e4cfbef60e4145bfb9c82a5682947ceb2371e52c27179cd69a238cd387bcfd744d3c55df814b6347f07781aec3ea658
SHA512 (evince-3.32.1.tar.xz) = 29028fedde9aff85e53a5059f63df007e1bac7d662a91fe01e1bb8c48349d5674afe3ce37f9c495e4b208fd476b22f4ecaf749c6d7c3362a03b05703400ece05