[gnome-epub-thumbnailer/f19] Yet another crash fix from upstream
Yanko Kaneti
yaneti at fedoraproject.org
Thu Jan 16 14:49:45 UTC 2014
commit 967aad9bd0a46509b3b6c7e176c6f327a9b99918
Author: Yanko Kaneti <yaneti at declera.com>
Date: Thu Jan 16 16:49:58 2014 +0200
Yet another crash fix from upstream
0001-mobi-Fix-parsing-garbage-with-no-cover.patch | 27 +++++++++++++++++++++
gnome-epub-thumbnailer.spec | 7 ++++-
2 files changed, 33 insertions(+), 1 deletions(-)
---
diff --git a/0001-mobi-Fix-parsing-garbage-with-no-cover.patch b/0001-mobi-Fix-parsing-garbage-with-no-cover.patch
new file mode 100644
index 0000000..5e05ba2
--- /dev/null
+++ b/0001-mobi-Fix-parsing-garbage-with-no-cover.patch
@@ -0,0 +1,27 @@
+From 3358deaeb0a2025d0bfa8458e697f0e911e2f363 Mon Sep 17 00:00:00 2001
+From: Bastien Nocera <hadess at hadess.net>
+Date: Wed, 13 Nov 2013 18:21:19 +0100
+Subject: [PATCH] mobi: Fix parsing garbage with no cover
+
+We were never checking the retval of get_cover_img_num() so if
+no covers were found, we'd try to read index-of-first-img minus 1.
+---
+ gnome-mobi-thumbnailer.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/gnome-mobi-thumbnailer.c b/gnome-mobi-thumbnailer.c
+index 67c04bf..797192a 100644
+--- a/gnome-mobi-thumbnailer.c
++++ b/gnome-mobi-thumbnailer.c
+@@ -183,6 +183,8 @@ get_image_section (GInputStream *stream,
+ }
+
+ image_num = get_cover_img_num (header);
++ if (image_num < 0)
++ return image_num;
+
+ return first_img + image_num;
+ }
+--
+1.8.5.2
+
diff --git a/gnome-epub-thumbnailer.spec b/gnome-epub-thumbnailer.spec
index a2b7033..3f0f181 100644
--- a/gnome-epub-thumbnailer.spec
+++ b/gnome-epub-thumbnailer.spec
@@ -1,6 +1,6 @@
Name: gnome-epub-thumbnailer
Version: 1.3
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Thumbnailers for EPub and MOBI books
License: GPLv2+
@@ -13,6 +13,8 @@ Patch1: 0001-epub-Set-an-error-when-the-cover-can-t-be-found.patch
Patch2: 0001-mobi-Don-t-bail-on-encrypted-mobi-files.patch
# Upstream commit 53d83c1a4a7f140149fec7f2aecf91034dbb3546
Patch3: 0001-Update-skeleton-to-fix-crash-with-trash-recent-files.patch
+# Upstream commit 3358deaeb0a2025d0bfa8458e697f0e911e2f363
+Patch4: 0001-mobi-Fix-parsing-garbage-with-no-cover.patch
BuildRequires: pkgconfig(gdk-pixbuf-2.0)
BuildRequires: pkgconfig(gio-2.0)
@@ -48,6 +50,9 @@ make DESTDIR=$RPM_BUILD_ROOT install
%changelog
+* Thu Jan 16 2014 Yanko Kaneti <yaneti at declera.com> - 1.3-4
+- Yet another crash fix from upstream
+
* Mon Jan 6 2014 Yanko Kaneti <yaneti at declera.com> - 1.3-3
- Fix crashes on thumbnailing trash/recent files - #1046245
- Get unencrypted cover from otherwise encrypted mobi files
More information about the scm-commits
mailing list