Don't crash on failure to find a cover file - #1001559

epel9
Yanko Kaneti 11 years ago
parent 16860320ab
commit b341bf5e05

@ -0,0 +1,27 @@
From 68841e9a7658b6bafd4d94f4199ea047d303f1d3 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Sun, 1 Sep 2013 17:26:13 +0200
Subject: [PATCH] epub: Set an error when the cover can't be found
This stops a crash in the thumbnailer if the cover cannot
be found.
---
gnome-epub-thumbnailer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gnome-epub-thumbnailer.c b/gnome-epub-thumbnailer.c
index e2a3615..1cb8149 100644
--- a/gnome-epub-thumbnailer.c
+++ b/gnome-epub-thumbnailer.c
@@ -283,7 +283,7 @@ file_to_data (const char *path,
}
if (cover_data == NULL) {
- g_warning ("Could not find cover file in '%s'", path);
+ g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED, "Could not find cover file");
return NULL;
}
--
1.8.3.1

@ -1,12 +1,15 @@
Name: gnome-epub-thumbnailer
Version: 1.3
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Thumbnailers for EPub and MOBI books
License: GPLv2+
URL: https://git.gnome.org/browse/gnome-epub-thumbnailer
Source0: http://download.gnome.org/sources/%{name}/1.3/%{name}-%{version}.tar.xz
# Upstream commit 68841e9a7658b6bafd4d94f4199ea047d303f1d3
Patch0: 0001-epub-Set-an-error-when-the-cover-can-t-be-found.patch
BuildRequires: pkgconfig(gdk-pixbuf-2.0)
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(libxml-2.0)
@ -18,6 +21,7 @@ Thumbnailers for EPub and MOBI books
%prep
%setup -q
%patch1 -p1 -b .crash-cover
%build
@ -40,6 +44,9 @@ make DESTDIR=$RPM_BUILD_ROOT install
%changelog
* Sun Oct 27 2013 Yanko Kaneti <yaneti@declera.com> - 1.3-2
- Don't crash on failure to find a cover file - #1001559
* Thu Aug 8 2013 Yanko Kaneti <yaneti@declera.com> - 1.3-1
- New upstream release fixing a number of possible crashers
in the MOBI thumbnailer

Loading…
Cancel
Save