[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - external/liborcus

Kohei Yoshida kohei.yoshida at gmail.com
Thu Feb 22 12:29:16 UTC 2018


 external/liborcus/0001-protect-the-self-closing-xml-element-code-against-se.patch |   30 ++++++++++
 external/liborcus/UnpackedTarball_liborcus.mk                                     |    1 
 2 files changed, 31 insertions(+)

New commits:
commit f25bc1254782589af5d24471599260b65558154a
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Wed Feb 21 20:08:23 2018 -0500

    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
    
    Change-Id: I701c5a65ff67d77767913f8d056682b9db549f84
    Reviewed-on: https://gerrit.libreoffice.org/50147
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

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 at 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 93b988553116..791436e66016 100644
--- a/external/liborcus/UnpackedTarball_liborcus.mk
+++ b/external/liborcus/UnpackedTarball_liborcus.mk
@@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
 	external/liborcus/rpath.patch.0 \
 	external/liborcus/visibility.patch.0 \
 	external/liborcus/nullptr-in-ostringstream.patch.1 \
+	external/liborcus/0001-protect-the-self-closing-xml-element-code-against-se.patch \
 ))
 
 ifeq ($(OS),WNT)


More information about the Libreoffice-commits mailing list