Update to 3.30.3

This commit is contained in:
Kalev Lember 2019-09-29 20:48:08 +02:00
parent 616a3562a8
commit adabfa21f0
4 changed files with 7 additions and 78 deletions

1
.gitignore vendored
View File

@ -77,3 +77,4 @@ evince-3.0.0.tar.bz2
/evince-3.30.0.tar.xz
/evince-3.30.1.tar.xz
/evince-3.30.2.tar.xz
/evince-3.30.3.tar.xz

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.30.2
Release: 4%{?dist}
Version: 3.30.3
Release: 1%{?dist}
Summary: Document viewer
License: GPLv2+ and GPLv3+ and LGPLv2+ and MIT and Afmparse
@ -17,9 +17,6 @@ Patch0: evince-3.21.4-NPNVToolKit.patch
# https://bugzilla.gnome.org/show_bug.cgi?id=766749
Patch3: 0001-Resolves-deb-762530-rhbz-1061177-add-man-pages.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1716295
Patch4: 0001-tiff-Handle-failure-from-TIFFReadRGBAImageOriented.patch
BuildRequires: gcc-c++
BuildRequires: gcc
BuildRequires: pkgconfig(adwaita-icon-theme)
@ -249,6 +246,9 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/org.gnome.Evince-p
%{_libdir}/nautilus/extensions-3.0/libevince-properties-page.so
%changelog
* Sun Sep 29 2019 Kalev Lember <klember@redhat.com> - 3.30.3-1
- Update to 3.30.3
* Tue Jun 11 2019 Marek Kasik <mkasik@redhat.com> - 3.30.2-4
- Handle failure from TIFFReadRGBAImageOriented
- Resolves: #1716298

View File

@ -1 +1 @@
SHA512 (evince-3.30.2.tar.xz) = dfffcf15547d0720bd2379054d7b9bee02f8bea7113562162cbab62d77cf84c04f70dcc87a3e6b1ba62db38783df8f481d801854d8f0767f60e9cfabd9efc646
SHA512 (evince-3.30.3.tar.xz) = 63ec837249d7c43741bfb4af2dc299693b02de9ec7e72fa41184578c3338b70c13b786e65d90cd7a548dc32c28e2b17e517292b1a57ade6d388135d944c57f65