summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2018-02-21 20:08:23 -0500
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2018-06-01 15:40:06 +0200
commitfb885579b9ca441ecfc08677b367fbdaa8b15f5d (patch)
treed352b36c3f561f873f9e48600f0c741a44fadf80 /external
parent66b690bc0137a8fcf351987837a007b3d7994883 (diff)
Patch liborcus to avoid incorrect parsing of XML.
Found by Antti Levomäki and Christian Jalio from Forcepoint. This one is not a backport from the master branch. On the master branch the same fix will come from updating liborcus from 0.13.3 to 0.13.4. (cherry picked from commit 160350de5f07024b22fb5a9b596918ccc7f22c75) Conflicts: external/liborcus/UnpackedTarball_liborcus.mk Reviewed-on: https://gerrit.libreoffice.org/50147 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit f25bc1254782589af5d24471599260b65558154a) Conflicts: external/liborcus/UnpackedTarball_liborcus.mk Change-Id: I701c5a65ff67d77767913f8d056682b9db549f84
Diffstat (limited to 'external')
-rw-r--r--external/liborcus/0001-protect-the-self-closing-xml-element-code-against-se.patch30
-rw-r--r--external/liborcus/UnpackedTarball_liborcus.mk1
2 files changed, 31 insertions, 0 deletions
diff --git a/external/liborcus/0001-protect-the-self-closing-xml-element-code-against-se.patch b/external/liborcus/0001-protect-the-self-closing-xml-element-code-against-se.patch
new file mode 100644
index 000000000000..990665f9c383
--- /dev/null
+++ b/external/liborcus/0001-protect-the-self-closing-xml-element-code-against-se.patch
@@ -0,0 +1,30 @@
+From 12e5d89cbd7101c61fbdf063322203a1590a0ef5 Mon Sep 17 00:00:00 2001
+From: Markus Mohrhard <markus.mohrhard@googlemail.com>
+Date: Wed, 21 Feb 2018 00:29:03 +0100
+Subject: [PATCH] protect the self-closing xml element code against
+ self-closing root elements
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Found by Antti Levomäki and Christian Jalio from Forcepoint.
+---
+ include/orcus/sax_parser.hpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/include/orcus/sax_parser.hpp b/include/orcus/sax_parser.hpp
+index ba5ebcd..67d5943 100644
+--- a/include/orcus/sax_parser.hpp
++++ b/include/orcus/sax_parser.hpp
+@@ -171,6 +171,8 @@ void sax_parser<_Handler,_Config>::element_open(std::ptrdiff_t begin_pos)
+ m_handler.start_element(elem);
+ reset_buffer_pos();
+ m_handler.end_element(elem);
++ if (!m_nest_level)
++ m_root_elem_open = false;
+ #if ORCUS_DEBUG_SAX_PARSER
+ cout << "element_open: ns='" << elem.ns << "', name='" << elem.name << "' (self-closing)" << endl;
+ #endif
+--
+2.7.4
+
diff --git a/external/liborcus/UnpackedTarball_liborcus.mk b/external/liborcus/UnpackedTarball_liborcus.mk
index 08f3423f2424..51f6e55e1de1 100644
--- a/external/liborcus/UnpackedTarball_liborcus.mk
+++ b/external/liborcus/UnpackedTarball_liborcus.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,liborcus,1))
$(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
external/liborcus/0001-workaround-a-linking-problem-on-windows.patch \
external/liborcus/rpath.patch.0 \
+ external/liborcus/0001-protect-the-self-closing-xml-element-code-against-se.patch \
))
ifeq ($(OS),WNT)