commit ebook-tools for openSUSE:Factory
Hello community, here is the log from the commit of package ebook-tools for openSUSE:Factory checked in at 2019-05-03 22:25:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ebook-tools (Old) and /work/SRC/openSUSE:Factory/.ebook-tools.new.5148 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "ebook-tools" Fri May 3 22:25:45 2019 rev:21 rq:699965 version:0.2.2 Changes: -------- --- /work/SRC/openSUSE:Factory/ebook-tools/ebook-tools.changes 2014-06-30 21:50:27.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.ebook-tools.new.5148/ebook-tools.changes 2019-05-03 22:25:46.752134964 +0200 @@ -1,0 +2,8 @@ +Tue Apr 30 14:43:22 UTC 2019 - Stefan Brüns <stefan.bruens@rwth-aachen.de> + +- Fix a crash when a navPoint in toc.ncx has no navLabel, see + kde#406116 and https://sourceforge.net/p/ebook-tools/bugs/8/ + * add 0001-Avoid-crash-on-toc-navPoint-without-navLabel.patch +- specfile cleanup, remove %defattr, add LICENSE + +------------------------------------------------------------------- New: ---- 0001-Avoid-crash-on-toc-navPoint-without-navLabel.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ebook-tools.spec ++++++ --- /var/tmp/diff_new_pack.K1EaR9/_old 2019-05-03 22:25:47.272136029 +0200 +++ /var/tmp/diff_new_pack.K1EaR9/_new 2019-05-03 22:25:47.276136038 +0200 @@ -1,7 +1,7 @@ # # spec file for package ebook-tools # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -33,6 +33,8 @@ Source1: baselibs.conf Patch1: ebook-tools-64bit-installation.diff Patch2: ebook-tools-visibility-hidden.patch +# PATCH-FIX-OPENSUSE - fix https://sourceforge.net/p/ebook-tools/bugs/8/ +Patch3: 0001-Avoid-crash-on-toc-navPoint-without-navLabel.patch %description ebook-tools provides some tools to handle ebook files @@ -58,6 +60,7 @@ %setup %patch1 -p1 %patch2 +%patch3 -p2 %build mkdir build @@ -79,16 +82,14 @@ %postun -n libepub0 -p /sbin/ldconfig %files -%defattr(-,root,root) %{_bindir}/einfo %{_bindir}/lit2epub %files -n libepub0 -%defattr(-,root,root) +%license LICENSE %{_libdir}/libepub.so.* %files -n libepub-devel -%defattr(-,root,root) %{_includedir}/epub.h %{_includedir}/epub_version.h %{_includedir}/epub_shared.h ++++++ 0001-Avoid-crash-on-toc-navPoint-without-navLabel.patch ++++++
From 93ebf942a90f9c95797838f9adab94bc0378671c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de> Date: Tue, 30 Apr 2019 16:36:09 +0200 Subject: [PATCH] Avoid crash on toc.ncx navPoint without navLabel
Althoug at least one navLabel is required per navPoint, there is no guarantee it actually exists. Avoid crashes due to invalid accesses of a null label in case the toc is broken, and spew a warning. Fixes #8 epub_tit_next crashes on navPoint without navLabel. --- ebook-tools/src/libepub/epub.c | 5 +++-- ebook-tools/src/libepub/opf.c | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ebook-tools/src/libepub/epub.c b/ebook-tools/src/libepub/epub.c index d085503..a259d9d 100644 --- a/ebook-tools/src/libepub/epub.c +++ b/ebook-tools/src/libepub/epub.c @@ -469,8 +469,9 @@ int epub_tit_next(struct titerator *tit) { case TITERATOR_NAVMAP: case TITERATOR_PAGES: ti = GetNodeData(curr); - tit->cache.label = - (char *)_opf_label_get_by_doc_lang(tit->epub->opf, ti->label); + if (ti->label) + tit->cache.label = + (char *)_opf_label_get_by_doc_lang(tit->epub->opf, ti->label); if (! tit->cache.label) tit->cache.label = (char *)ti->id; diff --git a/ebook-tools/src/libepub/opf.c b/ebook-tools/src/libepub/opf.c index 6851db2..09bce9e 100644 --- a/ebook-tools/src/libepub/opf.c +++ b/ebook-tools/src/libepub/opf.c @@ -398,6 +398,10 @@ void _opf_parse_navmap(struct opf *opf, xmlTextReaderPtr reader) { } else if (xmlTextReaderNodeType(reader) == 15) { if (item) { + if (! item->label) { + _epub_print_debug(opf->epub, DEBUG_WARNING, + "- missing navlabel for nav point element"); + } _epub_print_debug(opf->epub, DEBUG_INFO, "adding nav point item->%s %s (d:%d,p:%d)", item->id, item->src, item->depth, item->playOrder); -- 2.21.0
participants (1)
-
root