diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2018-02-21 20:08:23 -0500 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2018-02-22 13:28:52 +0100 |
commit | 76bb102d90ecc04de0dd016019c31ba1abcb9b26 (patch) | |
tree | c0ca60ead4fb974392e87d5e077f36ed086a33c3 /external | |
parent | 18350415ae85823d66fe9d063fd4eb75a6b77034 (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.
Change-Id: I701c5a65ff67d77767913f8d056682b9db549f84
Reviewed-on: https://gerrit.libreoffice.org/50146
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'external')
-rw-r--r-- | external/liborcus/0001-protect-the-self-closing-xml-element-code-against-se.patch | 30 | ||||
-rw-r--r-- | external/liborcus/UnpackedTarball_liborcus.mk | 1 |
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 e9270c24a5cb..7fadaa46b1c9 100644 --- a/external/liborcus/UnpackedTarball_liborcus.mk +++ b/external/liborcus/UnpackedTarball_liborcus.mk @@ -19,6 +19,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\ external/liborcus/0001-workaround-a-linking-problem-on-windows.patch \ external/liborcus/rpath.patch.0 \ external/liborcus/silence-assert.patch \ + external/liborcus/0001-protect-the-self-closing-xml-element-code-against-se.patch \ )) ifeq ($(OS),WNT) |