summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-11-28 09:53:47 +0000
committerDavid Tardon <dtardon@redhat.com>2014-02-10 13:11:04 +0100
commitf46fbca76017154f7feb7a4341f3030b2f126693 (patch)
treeb01cb7e17fb99881cfc805fd6dbf6522fe4e7f42
parent6a27efa43b2181599fb92ed99061e5b491dfd4a2 (diff)
fdo#72733 Fix crash on abi2010-1.doc example
(cherry picked from commit 3b65cd24408bb78676dfa42cf01669970125068a) Signed-off-by: David Tardon <dtardon@redhat.com> Change-Id: Ib3e43e14f9223bc53f20f1241d9b8c0eaa5470ad
-rw-r--r--external/libebook/0001-Fix-crash-on-abi2010-1.doc-example.patch30
-rw-r--r--external/libebook/UnpackedTarball_libebook.mk6
2 files changed, 36 insertions, 0 deletions
diff --git a/external/libebook/0001-Fix-crash-on-abi2010-1.doc-example.patch b/external/libebook/0001-Fix-crash-on-abi2010-1.doc-example.patch
new file mode 100644
index 000000000000..21ab72bbc164
--- /dev/null
+++ b/external/libebook/0001-Fix-crash-on-abi2010-1.doc-example.patch
@@ -0,0 +1,30 @@
+From 30021c75542a008ccf8814fa70d519f00bc69776 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
+Date: Thu, 28 Nov 2013 09:50:00 +0000
+Subject: [PATCH] Fix crash on abi2010-1.doc example
+
+---
+ src/lib/FB2Parser.cpp | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/src/lib/FB2Parser.cpp b/src/lib/FB2Parser.cpp
+index d258c09..3cd3e3c 100644
+--- a/src/lib/FB2Parser.cpp
++++ b/src/lib/FB2Parser.cpp
+@@ -357,8 +357,11 @@ FB2XMLParserContext *processNode(FB2XMLParserContext *const context, const xmlTe
+ {
+ case XML_READER_TYPE_ELEMENT :
+ {
+- const EBOOKToken *name = getFB2Token(xmlTextReaderConstLocalName(reader));
+- const EBOOKToken *ns = getFB2Token(xmlTextReaderConstNamespaceUri(reader));
++ const xmlChar *name_str = xmlTextReaderConstLocalName(reader);
++ const xmlChar *ns_str = xmlTextReaderConstNamespaceUri(reader);
++
++ const EBOOKToken *name = name_str ? getFB2Token(name_str) : 0;
++ const EBOOKToken *ns = ns_str ? getFB2Token(ns_str) : 0;
+
+ if (!name || !ns)
+ // TODO: unknown elements should not be skipped entirely, but
+--
+1.8.3.1
+
diff --git a/external/libebook/UnpackedTarball_libebook.mk b/external/libebook/UnpackedTarball_libebook.mk
index 555837beb701..3cf21e608f7e 100644
--- a/external/libebook/UnpackedTarball_libebook.mk
+++ b/external/libebook/UnpackedTarball_libebook.mk
@@ -11,4 +11,10 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,libebook))
$(eval $(call gb_UnpackedTarball_set_tarball,libebook,$(EBOOK_TARBALL)))
+$(eval $(call gb_UnpackedTarball_set_patchlevel,libebook,1))
+
+$(eval $(call gb_UnpackedTarball_add_patches,libebook,\
+ external/libebook/0001-Fix-crash-on-abi2010-1.doc-example.patch \
+))
+
# vim: set noet sw=4 ts=4: