Rebased ref, commits from common ancestor:
commit 1850312adb5ce450f76154227948fdef24806f60
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Wed Jan 15 17:16:02 2020 +0100
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Thu Oct 1 08:35:28 2020 +0200

    Remove a fragment from a file URL early on
    
    ...as ShellExecuteExW would ignore it anyway
    
    Change-Id: I969db094bb7d2ea230ac8c36eb23d71a90fbe466
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86868
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>
    (cherry picked from commit 14b36a16b225bf7c988f118d499a7287c47cd83e)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86877
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>
    (cherry picked from commit 51da0d22ff42b20ab38130b7874651ef136ecceb)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88208
    Reviewed-by: Michael Stahl <michael.st...@cib.de>
    Tested-by: Michael Stahl <michael.st...@cib.de>

diff --git a/shell/source/win32/SysShExec.cxx b/shell/source/win32/SysShExec.cxx
index 374ddad1a691..6f3b0d578323 100644
--- a/shell/source/win32/SysShExec.cxx
+++ b/shell/source/win32/SysShExec.cxx
@@ -296,6 +296,7 @@ void SAL_CALL CSysShExec::execute( const OUString& 
aCommand, const OUString& aPa
             static_cast< XSystemShellExecute* >( this ),
             3 );
 
+    OUString preprocessed_command(aCommand);
     if ((nFlags & URIS_ONLY) != 0)
     {
         css::uno::Reference< css::uri::XUriReference > uri(
@@ -310,8 +311,10 @@ void SAL_CALL CSysShExec::execute( const OUString& 
aCommand, const OUString& aPa
                 static_cast< cppu::OWeakObject * >(this), 0);
         }
         if (uri->getScheme().equalsIgnoreAsciiCase("file")) {
+            // ShellExecuteExW appears to ignore the fragment of a file URL 
anyway, so remove it:
+            uri->clearFragment();
+            preprocessed_command = uri->getUriReference();
             OUString pathname;
-            uri->clearFragment(); // getSystemPathFromFileURL fails for URLs 
with fragment
             auto const e1
                 = 
osl::FileBase::getSystemPathFromFileURL(uri->getUriReference(), pathname);
             if (e1 != osl::FileBase::E_None) {
@@ -415,7 +418,6 @@ void SAL_CALL CSysShExec::execute( const OUString& 
aCommand, const OUString& aPa
         and names no existing file (remember the jump mark
         sign '#' is a valid file name character we remove
         the jump mark, else ShellExecuteEx fails */
-    OUString preprocessed_command(aCommand);
     if (is_system_path(preprocessed_command))
     {
         if (has_jump_mark(preprocessed_command) && 
!is_existing_file(preprocessed_command))
commit 370726411deebdd605e78fc0084f9187fa67050e
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Thu Aug 1 10:52:12 2019 +0200
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Thu Oct 1 08:35:28 2020 +0200

    tdf#126641: don't fail on file URLs with fragment
    
    This only fixes part that the URL refuses to open the target file.
    Honoring fragment isn't fixed here, since it's the system call to
    ShellExecuteExW that in this case internally converts the file URL
    into a system path, and strips the fragment from it.
    
    Regression from commit d59ec4cd1660410fa1b18c50d2d83b1417a82ddc.
    
    Change-Id: I6c9ed27e9a5bd7f2780dd3be96f816a6e825e043
    Reviewed-on: https://gerrit.libreoffice.org/76778
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>
    (cherry picked from commit 2207269a84c7c9920af3385b837ce67978c720b4)
    Reviewed-on: https://gerrit.libreoffice.org/76848
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>
    (cherry picked from commit dd2b7919058fc0e23a7117d39110d3ecaaad1fb2)
    Reviewed-on: https://gerrit.libreoffice.org/76881
    Reviewed-by: Michael Stahl <michael.st...@cib.de>
    (cherry picked from commit 72861eaf7cf9af3e7764b13d9e74edc5548806d2)
    Reviewed-on: https://gerrit.libreoffice.org/77095
    Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>
    Tested-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/shell/source/win32/SysShExec.cxx b/shell/source/win32/SysShExec.cxx
index 83efeb0001bd..374ddad1a691 100644
--- a/shell/source/win32/SysShExec.cxx
+++ b/shell/source/win32/SysShExec.cxx
@@ -311,7 +311,9 @@ void SAL_CALL CSysShExec::execute( const OUString& 
aCommand, const OUString& aPa
         }
         if (uri->getScheme().equalsIgnoreAsciiCase("file")) {
             OUString pathname;
-            auto const e1 = osl::FileBase::getSystemPathFromFileURL(aCommand, 
pathname);
+            uri->clearFragment(); // getSystemPathFromFileURL fails for URLs 
with fragment
+            auto const e1
+                = 
osl::FileBase::getSystemPathFromFileURL(uri->getUriReference(), pathname);
             if (e1 != osl::FileBase::E_None) {
                 throw css::lang::IllegalArgumentException(
                     ("XSystemShellExecute.execute, getSystemPathFromFileURL <" 
+ aCommand
commit 0ac46085dc90872fbb058f943de1a7166b13d3ad
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Fri Mar 29 14:01:19 2019 +0100
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Thu Oct 1 08:35:27 2020 +0200

    Filter out problematic file URLs
    
    (cherry picked from commit 7e50e885ebbe130debcd4278a10a4e288655fdfc)
    Conflicts:
            shell/source/win32/SysShExec.cxx
    
    Reviewed-on: https://gerrit.libreoffice.org/70188
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>
    (cherry picked from commit a35068ba25ed9da37bcb20598c9791b6979cf1ef)
    Reviewed-on: https://gerrit.libreoffice.org/71589
    Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>
    Tested-by: Thorsten Behrens <thorsten.behr...@cib.de>
    
    Conflicts:
            shell/source/unix/exec/shellexec.cxx
            shell/source/win32/SysShExec.cxx
    
    Change-Id: I87fd37e56326bef4888354b923407530c6f70760

diff --git a/shell/source/unix/exec/shellexec.cxx 
b/shell/source/unix/exec/shellexec.cxx
index 972957bba73b..dd0ab1a91848 100644
--- a/shell/source/unix/exec/shellexec.cxx
+++ b/shell/source/unix/exec/shellexec.cxx
@@ -41,7 +41,10 @@
 #include <errno.h>
 #include <unistd.h>
 
-//------------------------------------------------------------------------
+#if defined MACOSX
+#include <sys/stat.h>
+#endif
+
 // namespace directives
 //------------------------------------------------------------------------
 
@@ -140,6 +143,39 @@ void SAL_CALL ShellExec::execute( const OUString& 
aCommand, const OUString& aPar
         }
 
 #ifdef MACOSX
+        if (uri->getScheme().equalsIgnoreAsciiCase("file")) {
+            OUString pathname;
+            auto const e1 = osl::FileBase::getSystemPathFromFileURL(aCommand, 
pathname);
+            if (e1 != osl::FileBase::E_None) {
+                throw css::lang::IllegalArgumentException(
+                    ("XSystemShellExecute.execute, getSystemPathFromFileURL <" 
+ aCommand
+                     + "> failed with " + OUString::number(e1)),
+                    {}, 0);
+            }
+            OString pathname8;
+            if (!pathname.convertToString(
+                    &pathname8, RTL_TEXTENCODING_UTF8,
+                    (RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR
+                     | RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR)))
+            {
+                throw css::lang::IllegalArgumentException(
+                    "XSystemShellExecute.execute, cannot convert \"" + 
pathname + "\" to UTF-8", {},
+                    0);
+            }
+            struct stat st;
+            auto const e2 = stat(pathname8.getStr(), &st);
+            if (e2 != 0) {
+                auto const e3 = errno;
+                SAL_INFO("shell", "stat(" << pathname8 << ") failed with errno 
" << e3);
+            }
+            if (e2 != 0 || !S_ISREG(st.st_mode)
+                || (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)) != 0)
+            {
+                throw css::lang::IllegalArgumentException(
+                    "XSystemShellExecute.execute, cannot process <" + aCommand 
+ ">", {}, 0);
+            }
+        }
+
         //TODO: Using open(1) with an argument that syntactically is an 
absolute
         // URI reference does not necessarily give expected results:
         // 1  If the given URI reference matches a supported scheme (e.g.,
diff --git a/shell/source/win32/SysShExec.cxx b/shell/source/win32/SysShExec.cxx
index 0d4d7793293e..83efeb0001bd 100644
--- a/shell/source/win32/SysShExec.cxx
+++ b/shell/source/win32/SysShExec.cxx
@@ -17,7 +17,11 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <cassert>
+
 #include <osl/diagnose.h>
+#include <osl/process.h>
+#include <sal/log.hxx>
 #include "SysShExec.hxx"
 #include <osl/file.hxx>
 #include <sal/macros.h>
@@ -25,6 +29,7 @@
 #include <com/sun/star/system/SystemShellExecuteFlags.hpp>
 #include <com/sun/star/uri/UriReferenceFactory.hpp>
 #include <cppuhelper/supportsservice.hxx>
+#include <o3tl/runtimetooustring.hxx>
 
 #define WIN32_LEAN_AND_MEAN
 #if defined _MSC_VER
@@ -32,6 +37,7 @@
 #endif
 #include <windows.h>
 #include <shellapi.h>
+#include <Shobjidl.h>
 #include <objbase.h>
 #if defined _MSC_VER
 #pragma warning(pop)
@@ -41,6 +47,8 @@
 // namespace directives
 //------------------------------------------------------------------------
 
+#include <systools/win32/comtools.hxx>
+
 using com::sun::star::uno::Reference;
 using com::sun::star::uno::RuntimeException;
 using com::sun::star::uno::Sequence;
@@ -257,7 +265,20 @@ CSysShExec::CSysShExec( const Reference< 
css::uno::XComponentContext >& xContext
     CoInitialize( NULL );
 }
 
-//-------------------------------------------------
+namespace
+{
+bool checkExtension(OUString const & extension, OUString const & blacklist) {
+    assert(!extension.isEmpty());
+    for (sal_Int32 i = 0; i != -1;) {
+        OUString tok = blacklist.getToken(0, ';', i);
+        tok.startsWith(".", &tok);
+        if (extension.equalsIgnoreAsciiCase(tok)) {
+            return false;
+        }
+    }
+    return true;
+}
+}
 
 void SAL_CALL CSysShExec::execute( const OUString& aCommand, const OUString& 
aParameter, sal_Int32 nFlags )
         throw (IllegalArgumentException, SystemShellExecuteException, 
RuntimeException)
@@ -288,6 +309,102 @@ void SAL_CALL CSysShExec::execute( const OUString& 
aCommand, const OUString& aPa
                  + aCommand),
                 static_cast< cppu::OWeakObject * >(this), 0);
         }
+        if (uri->getScheme().equalsIgnoreAsciiCase("file")) {
+            OUString pathname;
+            auto const e1 = osl::FileBase::getSystemPathFromFileURL(aCommand, 
pathname);
+            if (e1 != osl::FileBase::E_None) {
+                throw css::lang::IllegalArgumentException(
+                    ("XSystemShellExecute.execute, getSystemPathFromFileURL <" 
+ aCommand
+                     + "> failed with " + OUString::number(e1)),
+                    {}, 0);
+            }
+            for (int i = 0;; ++i) {
+                SHFILEINFOW info;
+                if (SHGetFileInfoW(
+                        pathname.getStr(), 0, &info, sizeof info, 
SHGFI_EXETYPE)
+                    != 0)
+                {
+                    throw css::lang::IllegalArgumentException(
+                        "XSystemShellExecute.execute, cannot process <" + 
aCommand + ">", {}, 0);
+                }
+                if (SHGetFileInfoW(
+                        pathname.getStr(), 0, &info, sizeof info, 
SHGFI_ATTRIBUTES)
+                    == 0)
+                {
+                    throw css::lang::IllegalArgumentException(
+                        "XSystemShellExecute.execute, SHGetFileInfoW(" + 
pathname + ") failed", {},
+                        0);
+                }
+                if ((info.dwAttributes & SFGAO_LINK) == 0) {
+                    break;
+                }
+                sal::systools::COMReference<IShellLinkW> link;
+                auto e2 = CoCreateInstance(
+                    CLSID_ShellLink, nullptr, CLSCTX_INPROC_SERVER, 
IID_IShellLinkW,
+                    reinterpret_cast<LPVOID *>(&link));
+                if (FAILED(e2)) {
+                    throw css::lang::IllegalArgumentException(
+                        ("XSystemShellExecute.execute, CoCreateInstance failed 
with "
+                         + OUString::number(e2)),
+                        {}, 0);
+                }
+                sal::systools::COMReference<IPersistFile> file;
+                try {
+                    file = link.QueryInterface<IPersistFile>(IID_IPersistFile);
+                } catch(sal::systools::ComError & e3) {
+                    throw css::lang::IllegalArgumentException(
+                        ("XSystemShellExecute.execute, QueryInterface failed 
with: "
+                         + o3tl::runtimeToOUString(e3.what())),
+                        {}, 0);
+                }
+                e2 = file->Load(pathname.getStr(), STGM_READ);
+                if (FAILED(e2)) {
+                    throw css::lang::IllegalArgumentException(
+                        ("XSystemShellExecute.execute, IPersistFile.Load 
failed with "
+                         + OUString::number(e2)),
+                        {}, 0);
+                }
+                e2 = link->Resolve(nullptr, SLR_UPDATE | SLR_NO_UI);
+                if (FAILED(e2)) {
+                    throw css::lang::IllegalArgumentException(
+                        ("XSystemShellExecute.execute, IShellLink.Resolve 
failed with "
+                         + OUString::number(e2)),
+                        {}, 0);
+                }
+                wchar_t path[MAX_PATH];
+                WIN32_FIND_DATAW wfd;
+                e2 = link->GetPath(path, MAX_PATH, &wfd, SLGP_RAWPATH);
+                if (FAILED(e2)) {
+                    throw css::lang::IllegalArgumentException(
+                        ("XSystemShellExecute.execute, IShellLink.GetPath 
failed with "
+                         + OUString::number(e2)),
+                        {}, 0);
+                }
+                pathname = path;
+                // Fail at some arbitrary nesting depth, to avoid an infinite 
loop:
+                if (i == 30) {
+                    throw css::lang::IllegalArgumentException(
+                        "XSystemShellExecute.execute, link depth exceeded for 
<" + aCommand + ">",
+                        {}, 0);
+                }
+            }
+            auto const n = pathname.lastIndexOf('.');
+            if (n > pathname.lastIndexOf('\\')) {
+                auto const ext = pathname.copy(n + 1);
+                OUString env;
+                if (osl_getEnvironment(OUString("PATHEXT").pData, &env.pData) 
!= osl_Process_E_None)
+                {
+                    SAL_INFO("shell", "osl_getEnvironment(PATHEXT) failed");
+                }
+                if (!(checkExtension(ext, env)
+                      && checkExtension(
+                          ext, 
".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY")))
+                {
+                    throw css::lang::IllegalArgumentException(
+                        "XSystemShellExecute.execute, cannot process <" + 
aCommand + ">", {}, 0);
+                }
+            }
+        }
     }
 
     /*  #i4789#; jump mark detection on system paths
commit 7cb748bbc8ccf7e95c5af0e62018750ddcd29624
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Wed Nov 23 23:10:29 2016 +0100
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Thu Oct 1 08:35:26 2020 +0200

    New o3tl::runtimeToOUString to convert from C++ runtime NTBS to OUString
    
    Change-Id: I613bb70b6828f615fd45af38b2d873ece55ace60
    (cherry picked from commit d689ad29c28ad7f077c2239a8fa4c2b6307a6aa1)
    Reviewed-on: https://gerrit.libreoffice.org/71591
    Reviewed-by: Michael Stahl <michael.st...@cib.de>
    Tested-by: Michael Stahl <michael.st...@cib.de>

diff --git a/include/o3tl/runtimetooustring.hxx 
b/include/o3tl/runtimetooustring.hxx
new file mode 100644
index 000000000000..7f2015805722
--- /dev/null
+++ b/include/o3tl/runtimetooustring.hxx
@@ -0,0 +1,48 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_O3TL_RUNTIMETOOUSTRING_HXX
+#define INCLUDED_O3TL_RUNTIMETOOUSTRING_HXX
+
+#include <sal/config.h>
+
+#include <cassert>
+#include <cstring>
+
+#include <rtl/textcvt.h>
+#include <rtl/textenc.h>
+#include <rtl/ustring.h>
+#include <rtl/ustring.hxx>
+
+namespace o3tl {
+
+/** Convert an NTBS from the C++ runtime to an OUString.
+
+    This is used to convert an NTBS as provided by std::exception::what or
+    std::type_info::name into an OUString in a "lossless" way.  The conversion
+    is done using RTL_TEXTENCODING_ISO_8859_1, so each char in the input maps
+    to one Unicode character in the output.
+*/
+inline OUString runtimeToOUString(char const * runtimeString) {
+    OUString s;
+    bool ok = rtl_convertStringToUString(
+        &s.pData, runtimeString, std::strlen(runtimeString),
+        RTL_TEXTENCODING_ISO_8859_1,
+        (RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_ERROR
+         | RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_ERROR
+         | RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR));
+    assert(ok); (void) ok;
+    return s;
+}
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
commit 38b684d683d4e83619bb2f4db9b42b21f19c3706
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Mon Sep 16 09:34:00 2019 +0100
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Thu Oct 1 08:35:25 2020 +0200

    latest expat
    
    Reviewed-on: https://gerrit.libreoffice.org/78978
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@cib.de>
    (cherry picked from commit 4436a29401beffd0893ecae70cd09c7a49f49f22)
    
    Reviewed-on: https://gerrit.libreoffice.org/79275
    Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>
    Tested-by: Thorsten Behrens <thorsten.behr...@cib.de>
    
    Conflicts:
            download.lst
            external/expat/ExternalProject_expat.mk
    
    Change-Id: Ia98c9718ccd8e18b5f56851027bde944164f05c4

diff --git a/download.lst b/download.lst
index 422be1448dc2..b5da6a0b1887 100644
--- a/download.lst
+++ b/download.lst
@@ -8,8 +8,8 @@ EBOOK_MD5SUM := 2f1ceaf2ac8752ed278e175447d9b978
 export EBOOK_TARBALL := libe-book-0.0.3.tar.bz2
 ETONYEK_MD5SUM := 3c50bc60394d1f2675fbf9bd22581363
 export ETONYEK_TARBALL := libetonyek-0.0.4.tar.bz2
-EXPAT_MD5SUM := 789e297f547980fc9ecc036f9a070d49
-export EXPAT_TARBALL := expat-2.2.5.tar.bz2
+EXPAT_MD5SUM := 00858041acfea5757af55e6ee6b86231
+export EXPAT_TARBALL := expat-2.2.8.tar.bz2
 FREEHAND_MD5SUM := 496dd00028afcc19f896b01394769043
 export FREEHAND_TARBALL := libfreehand-0.0.0.tar.bz2
 GRAPHITE_MD5SUM := 9c499b8ec9f1b81fd0bb6a3b986f4b0f
diff --git a/external/expat/ExternalProject_expat.mk 
b/external/expat/ExternalProject_expat.mk
index 2fdaf5e1a4cb..06793bf50df1 100644
--- a/external/expat/ExternalProject_expat.mk
+++ b/external/expat/ExternalProject_expat.mk
@@ -15,7 +15,7 @@ $(eval $(call gb_ExternalProject_register_targets,expat,\
 
 $(call gb_ExternalProject_get_state_target,expat,configure) :
        $(call gb_ExternalProject_run,configure,\
-               ./configure \
+               ./configure --without-docbook \
                        $(if $(filter 
YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
        ,,expat_configure.log)
 
diff --git a/external/expat/StaticLibrary_expat.mk 
b/external/expat/StaticLibrary_expat.mk
index 9f0726d4a3fe..2f754526b6e9 100644
--- a/external/expat/StaticLibrary_expat.mk
+++ b/external/expat/StaticLibrary_expat.mk
@@ -48,7 +48,6 @@ $(eval $(call gb_StaticLibrary_add_cflags,expat,\
 ))
 
 $(eval $(call gb_StaticLibrary_add_generated_cobjects,expat,\
-       UnpackedTarball/expat/lib/loadlibrary \
        UnpackedTarball/expat/lib/xmlparse \
        UnpackedTarball/expat/lib/xmlrole \
        UnpackedTarball/expat/lib/xmltok \
diff --git a/external/expat/StaticLibrary_expat_x64.mk 
b/external/expat/StaticLibrary_expat_x64.mk
index 4f92d0fb284e..a38ba28c80dd 100644
--- a/external/expat/StaticLibrary_expat_x64.mk
+++ b/external/expat/StaticLibrary_expat_x64.mk
@@ -25,7 +25,6 @@ $(eval $(call gb_StaticLibrary_add_defs,expat_x64,\
 ))
 
 $(eval $(call gb_StaticLibrary_add_x64_generated_cobjects,expat_x64,\
-       UnpackedTarball/expat/lib/loadlibrary_x64 \
        UnpackedTarball/expat/lib/xmlparse_x64 \
        UnpackedTarball/expat/lib/xmltok_x64 \
        UnpackedTarball/expat/lib/xmlrole_x64 \
diff --git a/external/expat/UnpackedTarball_expat.mk 
b/external/expat/UnpackedTarball_expat.mk
index f90fc8552568..60e933d76090 100644
--- a/external/expat/UnpackedTarball_expat.mk
+++ b/external/expat/UnpackedTarball_expat.mk
@@ -24,7 +24,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,expat,\
 
 $(eval $(call gb_UnpackedTarball_set_post_action,expat,\
        $(if $(filter $(BUILD_X64),TRUE),         \
-         cp lib/loadlibrary.c lib/loadlibrary_x64.c && \
          cp lib/xmlparse.c lib/xmlparse_x64.c && \
          cp lib/xmltok.c lib/xmltok_x64.c     && \
          cp lib/xmlrole.c lib/xmlrole_x64.c) \
diff --git a/external/expat/expat-winapi.patch 
b/external/expat/expat-winapi.patch
index 3fe8a8a63e5a..b33c12b83b4c 100644
--- a/external/expat/expat-winapi.patch
+++ b/external/expat/expat-winapi.patch
@@ -1,13 +1,13 @@
 --- misc/expat-2.1.0/lib/expat_external.h      2009-11-16 08:53:17.375000000 
+0000
 +++ misc/build/expat-2.1.0/lib/expat_external.h        2009-11-16 
08:53:34.703125000 +0000
-@@ -7,10 +7,6 @@
+@@ -81,10 +81,6 @@
+ #  ifndef XML_BUILDING_EXPAT
+ /* using Expat from an application */
  
- /* External API definitions */
- 
--#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)
--# define XML_USE_MSC_EXTENSIONS 1
--#endif
+-#    if defined(_MSC_EXTENSIONS) && ! defined(__BEOS__) && ! 
defined(__CYGWIN__)
+-#      define XMLIMPORT __declspec(dllimport)
+-#    endif
 -
- /* Expat tries very hard to make the API boundary very specifically
-    defined.  There are two macros defined to control this boundary;
-    each of these can be defined before including this header to
+ #  endif
+ #endif /* not defined XML_STATIC */
+ 
commit 56ca559dcf800f47769c81d9ac00dbe617849678
Author:     David Tardon <dtar...@redhat.com>
AuthorDate: Wed Nov 8 19:01:59 2017 +0100
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Thu Oct 1 08:35:25 2020 +0200

    upload expat 2.2.5
    
    Reviewed-on: https://gerrit.libreoffice.org/44552
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: David Tardon <dtar...@redhat.com>
    (cherry picked from commit 34a7a9fd7649655256a85b5701d461af5ccc2016)
    
    Reviewed-on: https://gerrit.libreoffice.org/79274
    Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>
    Tested-by: Thorsten Behrens <thorsten.behr...@cib.de>
    
    Conflicts:
            download.lst
    
    Change-Id: Ic92002ec4f5edc48ca1bb3ac84836c4e6d19833c

diff --git a/download.lst b/download.lst
index d83854f50b19..422be1448dc2 100644
--- a/download.lst
+++ b/download.lst
@@ -8,8 +8,8 @@ EBOOK_MD5SUM := 2f1ceaf2ac8752ed278e175447d9b978
 export EBOOK_TARBALL := libe-book-0.0.3.tar.bz2
 ETONYEK_MD5SUM := 3c50bc60394d1f2675fbf9bd22581363
 export ETONYEK_TARBALL := libetonyek-0.0.4.tar.bz2
-EXPAT_MD5SUM := f053af63ef5f39bd9b78d01fbc203334
-export EXPAT_TARBALL := expat-2.2.3.tar.bz2
+EXPAT_MD5SUM := 789e297f547980fc9ecc036f9a070d49
+export EXPAT_TARBALL := expat-2.2.5.tar.bz2
 FREEHAND_MD5SUM := 496dd00028afcc19f896b01394769043
 export FREEHAND_TARBALL := libfreehand-0.0.0.tar.bz2
 GRAPHITE_MD5SUM := 9c499b8ec9f1b81fd0bb6a3b986f4b0f
diff --git a/external/expat/expat-winapi.patch 
b/external/expat/expat-winapi.patch
index 070dafc0cb0c..3fe8a8a63e5a 100644
--- a/external/expat/expat-winapi.patch
+++ b/external/expat/expat-winapi.patch
@@ -5,7 +5,7 @@
  /* External API definitions */
  
 -#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)
--#define XML_USE_MSC_EXTENSIONS 1
+-# define XML_USE_MSC_EXTENSIONS 1
 -#endif
 -
  /* Expat tries very hard to make the API boundary very specifically
commit e7f81d8fffddf9b63cb25616b1bdf0932346def0
Author:     Michael Stahl <michael.st...@cib.de>
AuthorDate: Wed Nov 20 15:05:02 2019 +0100
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Thu Oct 1 08:35:24 2020 +0200

    libxml2: upgrade to release 2.9.10
    
    ... which is, surprisingly enough, required to build the latest libxslt.
    
    Reviewed-on: https://gerrit.libreoffice.org/83311
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@cib.de>
    (cherry picked from commit d1bf39a78ed239d4493f0470ca937852265e79d6)
    Reviewed-on: https://gerrit.libreoffice.org/83347
    Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>
    (cherry picked from commit e9dc4662d4ba3bde91407911f1bc1a7aa25fa0ce)
    
    Conflicts:
            download.lst
    
    Change-Id: Ifbb36ed61b8f68185f9c788f63a8edeb58899f94

diff --git a/download.lst b/download.lst
index d5cf0f1b593c..d83854f50b19 100644
--- a/download.lst
+++ b/download.lst
@@ -97,7 +97,7 @@ export LIBXSLT_MD5SUM := db8765c8d076f1b6caafd9f2542a304a
 export LIBXSLT_VERSION_MICRO := 34
 export LIBXSLT_TARBALL := libxslt-1.1.$(LIBXSLT_VERSION_MICRO).tar.gz
 export LIBXML_MD5SUM := c04a5a0a042eaa157e8e8c9eabe76bd6
-export LIBXML_VERSION_MICRO := 9
+export LIBXML_VERSION_MICRO := 10
 export LIBXML_TARBALL := libxml2-2.9.$(LIBXML_VERSION_MICRO).tar.gz
 export LPSOLVE_TARBALL := 26b3e95ddf3d9c077c480ea45874b3b8-lp_solve_5.5.tar.gz
 export MARIADB_TARBALL := 
05f84c95b610c21c5fd510d10debcabf-mariadb-native-client-1.0.0.tar.bz2
diff --git a/external/libxml2/libxml2-android.patch 
b/external/libxml2/libxml2-android.patch
index 714de61068fb..42af83274026 100644
--- a/external/libxml2/libxml2-android.patch
+++ b/external/libxml2/libxml2-android.patch
@@ -4,7 +4,7 @@
        $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
  check: $(BUILT_SOURCES)
        $(MAKE) $(AM_MAKEFLAGS) check-recursive
--all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA) \
+-all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(SCRIPTS) $(MANS) $(DATA) \
 +all-am: Makefile $(LTLIBRARIES) \
                config.h
  install-binPROGRAMS: install-libLTLIBRARIES
diff --git a/external/libxml2/libxml2-config.patch.1 
b/external/libxml2/libxml2-config.patch.1
index 7b2b7f604188..7ad61923ebee 100644
--- a/external/libxml2/libxml2-config.patch.1
+++ b/external/libxml2/libxml2-config.patch.1
@@ -25,45 +25,19 @@ Hack the xml2-config to return paths into WORKDIR.
        ;;
  
      --cflags)
--              echo @XML_INCLUDEDIR@ @XML_CFLAGS@
-+        echo -I${includedir}
-+#             echo @XML_INCLUDEDIR@ @XML_CFLAGS@
+-        cflags="@XML_INCLUDEDIR@ @XML_CFLAGS@"
++        #cflags="@XML_INCLUDEDIR@ @XML_CFLAGS@"
++        cflags="-I${includedir}"
                ;;
  
      --libtool-libs)
-@@ -82,19 +88,24 @@
-               ;;
+@@ -91,7 +96,8 @@
+             libs="@XML_LIBDIR@ $libs"
+         fi
  
-     --libs)
--        if [ "`uname`" = "Linux" ]
--      then
--          if [ "@XML_LIBDIR@" = "-L/usr/lib" -o "@XML_LIBDIR@" = 
"-L/usr/lib64" ]
--          then
--              echo @XML_LIBS@ @MODULE_PLATFORM_LIBS@
--          else
--              echo @XML_LIBDIR@ @XML_LIBS@ @MODULE_PLATFORM_LIBS@
--          fi
--      else
--          echo @XML_LIBDIR@ @XML_LIBS@ @MODULE_PLATFORM_LIBS@ 
@WIN32_EXTRA_LIBADD@
--      fi
-+        echo -L${libdir} -lxml2 -lm
-+#        if [ "`uname`" = "Linux" ]
-+#     then
-+#         if [ "@XML_LIBDIR@" = "-L/usr/lib" -o "@XML_LIBDIR@" = 
"-L/usr/lib64" ]
-+#         then
-+#             echo @XML_LIBS@ @MODULE_PLATFORM_LIBS@
-+#         else
-+#             echo @XML_LIBDIR@ @XML_LIBS@ @MODULE_PLATFORM_LIBS@
-+#         fi
-+#     else
-+#         echo @XML_LIBDIR@ @XML_LIBS@ @MODULE_PLATFORM_LIBS@ 
@WIN32_EXTRA_LIBADD@
-+#     fi
-               ;;
+-        libs="$libs @WIN32_EXTRA_LIBADD@"
++        #libs="$libs @WIN32_EXTRA_LIBADD@"
++        libs="-L${libdir} -lxml2 -lm"
+         ;;
  
-+    print) # ugly configure hack
-+        exit 0
-+        ;;
-+ 
      *)
-       usage
-       exit 1
commit c5528c8712a3b83617c352bc6b7b79cfb31b9fd6
Author:     Michael Stahl <michael.st...@cib.de>
AuthorDate: Fri Jan 18 12:18:01 2019 +0100
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Thu Oct 1 08:35:23 2020 +0200

    libxml2: fix MSVC build
    
    libxml2.rc(1) : fatal error RC1015: cannot open include file 'winver.h'.
    
    Change-Id: I6653eaefd1da0440811154a718683951d79fb871

diff --git a/external/libxml2/ExternalProject_xml2.mk 
b/external/libxml2/ExternalProject_xml2.mk
index 5d8eba48de44..c48855eca238 100644
--- a/external/libxml2/ExternalProject_xml2.mk
+++ b/external/libxml2/ExternalProject_xml2.mk
@@ -33,7 +33,8 @@ $(call gb_ExternalProject_get_state_target,xml2,build):
                cscript configure.js \
                        iconv=no sax1=yes $(if 
$(MSVC_USE_DEBUG_RUNTIME),cruntime=/MDd) \
                && unset MAKEFLAGS \
-               && LIB="$(ILIB)" nmake \
+               && INCLUDE="$(subst -I,,$(subst $(WHITESPACE),;,$(SOLARINC)))" \
+                  LIB="$(ILIB)" nmake \
        ,win32)
 endif
 else # OS!=WNT
commit 8f7991d12ef510a8af510cacada1beb5ab53f3bf
Author:     Michael Stahl <michael.st...@cib.de>
AuthorDate: Mon Jan 14 15:44:35 2019 +0100
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Thu Oct 1 08:35:23 2020 +0200

    libxml2: upgrade to release 2.9.9
    
    * fixes CVE-2018-14404
    * drop one hunk from libxml2-android.patch that was added in commit
      6a17d2f2ba7acfec277314b97b50e41532d6b44d; presumably nan() exists now
      given that other code is calling it.
    
    Reviewed-on: https://gerrit.libreoffice.org/66308
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@cib.de>
    (cherry picked from commit beea5852720b22043aefcd1e6b7243c202b40601)
    Reviewed-on: https://gerrit.libreoffice.org/66367
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>
    (cherry picked from commit 69b5995ed815bea4d21080f64a4232f44131696f)
    
    Conflicts:
            download.lst
            external/libxml2/libxml2-android.patch
    
    Change-Id: I696cc4e1da55536ea1c89a6e0446ce5bc8398ba4

diff --git a/download.lst b/download.lst
index 283bb6a64017..d5cf0f1b593c 100644
--- a/download.lst
+++ b/download.lst
@@ -96,8 +96,8 @@ export LIBXMLSEC_TARBALL := 
1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.
 export LIBXSLT_MD5SUM := db8765c8d076f1b6caafd9f2542a304a
 export LIBXSLT_VERSION_MICRO := 34
 export LIBXSLT_TARBALL := libxslt-1.1.$(LIBXSLT_VERSION_MICRO).tar.gz
-export LIBXML_MD5SUM := b786e353e2aa1b872d70d5d1ca0c740d
-export LIBXML_VERSION_MICRO := 8
+export LIBXML_MD5SUM := c04a5a0a042eaa157e8e8c9eabe76bd6
+export LIBXML_VERSION_MICRO := 9
 export LIBXML_TARBALL := libxml2-2.9.$(LIBXML_VERSION_MICRO).tar.gz
 export LPSOLVE_TARBALL := 26b3e95ddf3d9c077c480ea45874b3b8-lp_solve_5.5.tar.gz
 export MARIADB_TARBALL := 
05f84c95b610c21c5fd510d10debcabf-mariadb-native-client-1.0.0.tar.bz2
diff --git a/external/libxml2/libxml2-android.patch 
b/external/libxml2/libxml2-android.patch
index fb18f36b28fa..714de61068fb 100644
--- a/external/libxml2/libxml2-android.patch
+++ b/external/libxml2/libxml2-android.patch
@@ -1,30 +1,3 @@
---- misc/libxml2-2.7.6/ltmain.sh
-+++ misc/build/libxml2-2.7.6/ltmain.sh
-@@ -3228,6 +3228,12 @@
-         func_warning "\`-release' is ignored for convenience libraries"
-       else
- 
-+      # Force no versioning suffix for Android thanks to silly
-+      # apkbuilder which doesn't add extra native libs unless their
-+      # name ends with .so
-+
-+      version_type=none
-+
-       # Parse the version information argument.
-       save_ifs="$IFS"; IFS=':'
-       set dummy $vinfo 0 0 0
---- misc/libxml2-2.7.6/trionan.c
-+++ misc/build/libxml2-2.7.6/trionan.c
-@@ -327,7 +327,7 @@
- 
-   if (result == 0.0) {
- 
--#if defined(TRIO_COMPILER_SUPPORTS_C99)
-+#if defined(TRIO_COMPILER_SUPPORTS_C99) && !(defined(__ANDROID__) && 
defined(__clang__))
-     result = nan("");
- 
- #elif defined(NAN) && defined(__STDC_IEC_559__)
-
 --- misc/libxml2-2.7.6/Makefile.in
 +++ misc/build/libxml2-2.7.6/Makefile.in
 @@ -1635,7 +1635,7 @@
diff --git a/external/libxml2/libxml2-global-symbols.patch 
b/external/libxml2/libxml2-global-symbols.patch
index ba34ac9cc0c6..49ee73731562 100644
--- a/external/libxml2/libxml2-global-symbols.patch
+++ b/external/libxml2/libxml2-global-symbols.patch
@@ -14,8 +14,8 @@
  
  LIBXML2_2.6.32 {
 @@ -2231,3 +2231,43 @@
-   xmlXPathSetContextNode;
- } LIBXML2_2.9.0;
+   xmlHashDefaultDeallocator;
+ } LIBXML2_2.9.1;
  
 +# HACK: export global variable accessor functions (globals.h)
 +LIBXML2_GLOBAL_VARIABLES {
commit b08a5f29ddcbaaa1c87604906bca4cbcd95934cc
Author:     Michael Stahl <mst...@redhat.com>
AuthorDate: Tue Mar 6 14:49:29 2018 +0100
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Thu Oct 1 08:35:22 2020 +0200

    libxml2: upgrade to release 2.9.8
    
    Reviewed-on: https://gerrit.libreoffice.org/50835
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Michael Stahl <mst...@redhat.com>
    (cherry picked from commit f775b5427bf085577feb5badb762156283d76ae5)
    
    Conflicts:
            download.lst
            external/libxml2/libxml2-icu.patch.0
    
    Change-Id: Ic6802c16b740f6aee59ae2f74b7edcd37461f1f3

diff --git a/download.lst b/download.lst
index a607943997be..283bb6a64017 100644
--- a/download.lst
+++ b/download.lst
@@ -96,8 +96,8 @@ export LIBXMLSEC_TARBALL := 
1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.
 export LIBXSLT_MD5SUM := db8765c8d076f1b6caafd9f2542a304a
 export LIBXSLT_VERSION_MICRO := 34
 export LIBXSLT_TARBALL := libxslt-1.1.$(LIBXSLT_VERSION_MICRO).tar.gz
-export LIBXML_MD5SUM := 896608641a08b465098a40ddf51cefba
-export LIBXML_VERSION_MICRO := 7
+export LIBXML_MD5SUM := b786e353e2aa1b872d70d5d1ca0c740d
+export LIBXML_VERSION_MICRO := 8
 export LIBXML_TARBALL := libxml2-2.9.$(LIBXML_VERSION_MICRO).tar.gz
 export LPSOLVE_TARBALL := 26b3e95ddf3d9c077c480ea45874b3b8-lp_solve_5.5.tar.gz
 export MARIADB_TARBALL := 
05f84c95b610c21c5fd510d10debcabf-mariadb-native-client-1.0.0.tar.bz2
diff --git a/external/libxml2/libxml2-vc10.patch 
b/external/libxml2/libxml2-vc10.patch
index e88d25563667..15bc4d973ea7 100644
--- a/external/libxml2/libxml2-vc10.patch
+++ b/external/libxml2/libxml2-vc10.patch
@@ -3,7 +3,7 @@ Add SOLARINC, and disable SSE2 default for MSVC2012
 --- build/libxml2-2.7.6/win32/Makefile.msvc.old        2010-09-20 
20:22:41.500000000 +0200
 +++ build/libxml2-2.7.6/win32/Makefile.msvc    2010-09-20 20:23:00.250000000 
+0200
 @@ -59,6 +59,7 @@
- CFLAGS = $(CFLAGS) /D "HAVE_LZMA_H"
+ CFLAGS = $(CFLAGS) /D "HAVE_PTHREAD_H"
  !endif
  CFLAGS = $(CFLAGS) /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
 +CFLAGS = $(CFLAGS) $(SOLARINC)
commit b507bb917ca3371f168295527654049ab76f99c7
Author:     David Tardon <dtar...@redhat.com>
AuthorDate: Tue Nov 7 19:49:20 2017 +0100
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Thu Oct 1 08:35:21 2020 +0200

    upload libxml2 2.9.7
    
    Reviewed-on: https://gerrit.libreoffice.org/44423
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: David Tardon <dtar...@redhat.com>
    (cherry picked from commit 3ab270242edc9e2ccbe50b2abecf3fec242113d1)
    
    Conflicts:
            download.lst
            external/libxml2/libxml2-icu.patch.0
    
    Change-Id: I3f72ec938c87e0c0d30a91b32d96fedf5379207f

diff --git a/download.lst b/download.lst
index d4f62b2f9867..a607943997be 100644
--- a/download.lst
+++ b/download.lst
@@ -96,8 +96,8 @@ export LIBXMLSEC_TARBALL := 
1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.
 export LIBXSLT_MD5SUM := db8765c8d076f1b6caafd9f2542a304a
 export LIBXSLT_VERSION_MICRO := 34
 export LIBXSLT_TARBALL := libxslt-1.1.$(LIBXSLT_VERSION_MICRO).tar.gz
-export LIBXML_MD5SUM := dbae8327d8471941bf0472e273473e36
-export LIBXML_VERSION_MICRO := 6
+export LIBXML_MD5SUM := 896608641a08b465098a40ddf51cefba
+export LIBXML_VERSION_MICRO := 7
 export LIBXML_TARBALL := libxml2-2.9.$(LIBXML_VERSION_MICRO).tar.gz
 export LPSOLVE_TARBALL := 26b3e95ddf3d9c077c480ea45874b3b8-lp_solve_5.5.tar.gz
 export MARIADB_TARBALL := 
05f84c95b610c21c5fd510d10debcabf-mariadb-native-client-1.0.0.tar.bz2
commit 0a1ec9ed69e62b89edaec52f118da41a5bc39222
Author:     David Tardon <dtar...@redhat.com>
AuthorDate: Tue Oct 10 10:19:04 2017 +0200
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Thu Oct 1 08:35:21 2020 +0200

    upload libxml2 2.9.6
    
    Reviewed-on: https://gerrit.libreoffice.org/43306
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: David Tardon <dtar...@redhat.com>
    (cherry picked from commit a0439f5a5b8ee8adaeba0bacbef3bf77a7fd05a0)
    
    Conflicts:
            download.lst
    
    Change-Id: Iafb9d9e2459451d213cad5d9141755df999d7ced

diff --git a/download.lst b/download.lst
index b9fc937904c6..d4f62b2f9867 100644
--- a/download.lst
+++ b/download.lst
@@ -93,12 +93,12 @@ export LCMS2_TARBALL := 
861ef15fa0bc018f9ddc932c4ad8b6dd-lcms2-2.4.tar.gz
 export LIBEXTTEXTCAT_TARBALL := 
ae330b9493bd4503ac390106ff6060d7-libexttextcat-3.4.3.tar.bz2
 export LIBLANGTAG_TARBALL := 
36271d3fa0d9dec1632029b6d7aac925-liblangtag-0.5.1.tar.bz2
 export LIBXMLSEC_TARBALL := 
1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz
-export LIBXML_TARBALL := ae249165c173b1ff386ee8ad676815f5-libxml2-2.9.4.tar.gz
 export LIBXSLT_MD5SUM := db8765c8d076f1b6caafd9f2542a304a
 export LIBXSLT_VERSION_MICRO := 34
 export LIBXSLT_TARBALL := libxslt-1.1.$(LIBXSLT_VERSION_MICRO).tar.gz
-export LIBXML_MD5SUM := 5ce0da9bdaa267b40c4ca36d35363b8b
-export LIBXML_TARBALL := libxml2-2.9.5.tar.gz
+export LIBXML_MD5SUM := dbae8327d8471941bf0472e273473e36
+export LIBXML_VERSION_MICRO := 6
+export LIBXML_TARBALL := libxml2-2.9.$(LIBXML_VERSION_MICRO).tar.gz
 export LPSOLVE_TARBALL := 26b3e95ddf3d9c077c480ea45874b3b8-lp_solve_5.5.tar.gz
 export MARIADB_TARBALL := 
05f84c95b610c21c5fd510d10debcabf-mariadb-native-client-1.0.0.tar.bz2
 export MDDS_TARBALL := a67a46ec9d00d283a7cd8dbdd2906b59-mdds_0.11.0.tar.bz2
diff --git a/external/libxml2/ExternalPackage_xml2.mk 
b/external/libxml2/ExternalPackage_xml2.mk
index b620699ef453..e0d95583140f 100644
--- a/external/libxml2/ExternalPackage_xml2.mk
+++ b/external/libxml2/ExternalPackage_xml2.mk
@@ -25,7 +25,7 @@ $(eval $(call 
gb_ExternalPackage_add_file,xml2,$(LIBO_URE_LIB_FOLDER)/libxml2.dl
 $(eval $(call 
gb_ExternalPackage_add_file,xml2,$(LIBO_LIB_FOLDER)/libxml2.dll,win32/bin.msvc/libxml2.dll))
 endif
 else # OS!=WNT
-$(eval $(call 
gb_ExternalPackage_add_file,xml2,$(LIBO_URE_LIB_FOLDER)/libxml2.so.2,.libs/libxml2.so.2.9.5))
+$(eval $(call 
gb_ExternalPackage_add_file,xml2,$(LIBO_URE_LIB_FOLDER)/libxml2.so.2,.libs/libxml2.so.2.9.$(LIBXML_VERSION_MICRO)))
 endif
 endif # DISABLE_DYNLOADING
 
commit c71352a47044d34aafa7ae327a13285aa64d432f
Author:     Michael Stahl <mst...@redhat.com>
AuthorDate: Tue Sep 5 17:24:14 2017 +0200
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Thu Oct 1 08:35:20 2020 +0200

    libxml2: upgrade to release 2.9.5
    
    * drop ubsan.patch.0: presumably fixed upstream
    * drop 0001-* CVE fixes: fixed upstream
    
    Reviewed-on: https://gerrit.libreoffice.org/41951
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Michael Stahl <mst...@redhat.com>
    (cherry picked from commit 2b329599183107735e1a7b6aad516452eb6fa6a6)
    
    Conflicts:
            download.lst
            external/libxml2/UnpackedTarball_xml2.mk
    
    Change-Id: I3e2a53b5ef82ef8edd85e812fd5dee67ab60db94

diff --git a/Makefile.fetch b/Makefile.fetch
index 5961c9d3a5de..e00e118c7c85 100644
--- a/Makefile.fetch
+++ b/Makefile.fetch
@@ -97,6 +97,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_host.mk 
$(SRCDIR)/download.lst $(SRCDIR)
                $(call fetch_Optional,VISIO,VISIO_TARBALL) \
                $(call fetch_Optional,ZLIB,ZLIB_TARBALL) \
                $(call fetch_Optional,LIBXSLT,LIBXSLT_TARBALL) \
+               $(call fetch_Optional,LIBXML2,LIBXML_TARBALL) \
        ,$(call 
fetch_Download_item_special,https://dev-www.libreoffice.org/src,$(item)))
        $(foreach item, \
                $(call fetch_Optional,AFMS,$(AFMS_TARBALL)) \
@@ -148,7 +149,6 @@ $(WORKDIR)/download: $(BUILDDIR)/config_host.mk 
$(SRCDIR)/download.lst $(SRCDIR)
                $(call fetch_Optional,LCMS2,$(LCMS2_TARBALL)) \
                $(call fetch_Optional,LIBEXTTEXTCAT,$(LIBEXTTEXTCAT_TARBALL)) \
                $(call fetch_Optional,LIBLANGTAG,$(LIBLANGTAG_TARBALL)) \
-               $(call fetch_Optional,LIBXML2,$(LIBXML_TARBALL)) \
                $(LIBXMLSEC_TARBALL) \
                $(call fetch_Optional,LPSOLVE,$(LPSOLVE_TARBALL)) \
                $(call fetch_Optional,MDDS,$(MDDS_TARBALL)) \
diff --git a/download.lst b/download.lst
index a928fab70c2b..b9fc937904c6 100644
--- a/download.lst
+++ b/download.lst
@@ -97,6 +97,8 @@ export LIBXML_TARBALL := 
ae249165c173b1ff386ee8ad676815f5-libxml2-2.9.4.tar.gz
 export LIBXSLT_MD5SUM := db8765c8d076f1b6caafd9f2542a304a
 export LIBXSLT_VERSION_MICRO := 34
 export LIBXSLT_TARBALL := libxslt-1.1.$(LIBXSLT_VERSION_MICRO).tar.gz
+export LIBXML_MD5SUM := 5ce0da9bdaa267b40c4ca36d35363b8b
+export LIBXML_TARBALL := libxml2-2.9.5.tar.gz
 export LPSOLVE_TARBALL := 26b3e95ddf3d9c077c480ea45874b3b8-lp_solve_5.5.tar.gz
 export MARIADB_TARBALL := 
05f84c95b610c21c5fd510d10debcabf-mariadb-native-client-1.0.0.tar.bz2
 export MDDS_TARBALL := a67a46ec9d00d283a7cd8dbdd2906b59-mdds_0.11.0.tar.bz2
diff --git 
a/external/libxml2/0001-Fix-buffer-size-checks-in-xmlSnprintfElementContent.patch.1
 
b/external/libxml2/0001-Fix-buffer-size-checks-in-xmlSnprintfElementContent.patch.1
deleted file mode 100644
index 047c88d943a7..000000000000
--- 
a/external/libxml2/0001-Fix-buffer-size-checks-in-xmlSnprintfElementContent.patch.1
+++ /dev/null
@@ -1,116 +0,0 @@
-From 932cc9896ab41475d4aa429c27d9afd175959d74 Mon Sep 17 00:00:00 2001
-From: Nick Wellnhofer <wellnho...@aevum.de>
-Date: Sat, 3 Jun 2017 02:01:29 +0200
-Subject: [PATCH] Fix buffer size checks in xmlSnprintfElementContent
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-xmlSnprintfElementContent failed to correctly check the available
-buffer space in two locations.
-
-Fixes bug 781333 (CVE-2017-9047) and bug 781701 (CVE-2017-9048).
-
-Thanks to Marcel Böhme and Thuan Pham for the report.
----
- result/valid/781333.xml         |  5 +++++
- result/valid/781333.xml.err     |  3 +++
- result/valid/781333.xml.err.rdr |  6 ++++++
- test/valid/781333.xml           |  4 ++++
- valid.c                         | 20 +++++++++++---------
- 5 files changed, 29 insertions(+), 9 deletions(-)
- create mode 100644 result/valid/781333.xml
- create mode 100644 result/valid/781333.xml.err
- create mode 100644 result/valid/781333.xml.err.rdr
- create mode 100644 test/valid/781333.xml
-
-diff --git a/result/valid/781333.xml b/result/valid/781333.xml
-new file mode 100644
-index 00000000..45dc451d
---- /dev/null
-+++ b/result/valid/781333.xml
-@@ -0,0 +1,5 @@
-+<?xml version="1.0"?>
-+<!DOCTYPE a [
-+<!ELEMENT a 
(ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
 
ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
 
ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
 
ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
 
pppppppppppppppppppppppppp:llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
 
lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
 lllllllllllllllllllllllllllllllll)>
-+]>
-+<a/>
-diff --git a/result/valid/781333.xml.err b/result/valid/781333.xml.err
-new file mode 100644
-index 00000000..b401b49a
---- /dev/null
-+++ b/result/valid/781333.xml.err
-@@ -0,0 +1,3 @@
-+./test/valid/781333.xml:4: element a: validity error : Element a content does 
not follow the DTD, expecting ( ..., got 
-+<a/>
-+    ^
-diff --git a/result/valid/781333.xml.err.rdr b/result/valid/781333.xml.err.rdr
-new file mode 100644
-index 00000000..5ff56992
---- /dev/null
-+++ b/result/valid/781333.xml.err.rdr
-@@ -0,0 +1,6 @@
-+./test/valid/781333.xml:4: element a: validity error : Element a content does 
not follow the DTD, expecting ( ..., got 
-+<a/>
-+    ^
-+./test/valid/781333.xml:5: element a: validity error : Element a content does 
not follow the DTD, Expecting more child
-+
-+^
-diff --git a/test/valid/781333.xml b/test/valid/781333.xml
-new file mode 100644
-index 00000000..b29e5a68
---- /dev/null
-+++ b/test/valid/781333.xml
-@@ -0,0 +1,4 @@
-+<!DOCTYPE a [
-+    <!ELEMENT a 
(ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
 
ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
 
ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
 
ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
 
pppppppppppppppppppppppppppppp:llllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
 
lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
 lllllllllllllllllllllllllllllllllllll)>
-+]>
-+<a/>
-diff --git a/valid.c b/valid.c
-index 19f84b82..9b2df56a 100644
---- a/valid.c
-+++ b/valid.c
-@@ -1262,22 +1262,23 @@ xmlSnprintfElementContent(char *buf, int size, 
xmlElementContentPtr content, int
-         case XML_ELEMENT_CONTENT_PCDATA:
-             strcat(buf, "#PCDATA");
-           break;
--      case XML_ELEMENT_CONTENT_ELEMENT:
-+      case XML_ELEMENT_CONTENT_ELEMENT: {
-+            int qnameLen = xmlStrlen(content->name);
-+
-+          if (content->prefix != NULL)
-+                qnameLen += xmlStrlen(content->prefix) + 1;
-+          if (size - len < qnameLen + 10) {
-+              strcat(buf, " ...");
-+              return;
-+          }
-           if (content->prefix != NULL) {
--              if (size - len < xmlStrlen(content->prefix) + 10) {
--                  strcat(buf, " ...");
--                  return;
--              }
-               strcat(buf, (char *) content->prefix);
-               strcat(buf, ":");
-           }
--          if (size - len < xmlStrlen(content->name) + 10) {
--              strcat(buf, " ...");
--              return;
--          }
-           if (content->name != NULL)
-               strcat(buf, (char *) content->name);
-           break;
-+        }
-       case XML_ELEMENT_CONTENT_SEQ:
-           if ((content->c1->type == XML_ELEMENT_CONTENT_OR) ||
-               (content->c1->type == XML_ELEMENT_CONTENT_SEQ))
-@@ -1319,6 +1320,7 @@ xmlSnprintfElementContent(char *buf, int size, 
xmlElementContentPtr content, int
-               xmlSnprintfElementContent(buf, size, content->c2, 0);
-           break;
-     }
-+    if (size - strlen(buf) <= 2) return;
-     if (englob)
-         strcat(buf, ")");
-     switch (content->ocur) {
--- 
-2.13.5
-
diff --git 
a/external/libxml2/0001-Fix-handling-of-parameter-entity-references.patch.1 
b/external/libxml2/0001-Fix-handling-of-parameter-entity-references.patch.1
deleted file mode 100644
index 8f005cf32181..000000000000
--- a/external/libxml2/0001-Fix-handling-of-parameter-entity-references.patch.1
+++ /dev/null
@@ -1,287 +0,0 @@
-From e26630548e7d138d2c560844c43820b6767251e3 Mon Sep 17 00:00:00 2001
-From: Nick Wellnhofer <wellnho...@aevum.de>
-Date: Mon, 5 Jun 2017 15:37:17 +0200
-Subject: [PATCH] Fix handling of parameter-entity references
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-There were two bugs where parameter-entity references could lead to an
-unexpected change of the input buffer in xmlParseNameComplex and
-xmlDictLookup being called with an invalid pointer.
-
-Percent sign in DTD Names
-=========================
-
-The NEXTL macro used to call xmlParserHandlePEReference. When parsing
-"complex" names inside the DTD, this could result in entity expansion
-which created a new input buffer. The fix is to simply remove the call
-to xmlParserHandlePEReference from the NEXTL macro. This is safe because
-no users of the macro require expansion of parameter entities.
-
-- xmlParseNameComplex
-- xmlParseNCNameComplex
-- xmlParseNmtoken
-
-The percent sign is not allowed in names, which are grammatical tokens.
-
-- xmlParseEntityValue
-
-Parameter-entity references in entity values are expanded but this
-happens in a separate step in this function.
-
-- xmlParseSystemLiteral
-
-Parameter-entity references are ignored in the system literal.
-
-- xmlParseAttValueComplex
-- xmlParseCharDataComplex
-- xmlParseCommentComplex
-- xmlParsePI
-- xmlParseCDSect
-
-Parameter-entity references are ignored outside the DTD.
-
-- xmlLoadEntityContent
-
-This function is only called from xmlStringLenDecodeEntities and
-entities are replaced in a separate step immediately after the function
-call.
-
-This bug could also be triggered with an internal subset and double
-entity expansion.
-
-This fixes bug 766956 initially reported by Wei Lei and independently by
-Chromium's ClusterFuzz, Hanno Böck, and Marco Grassi. Thanks to everyone
-involved.
-
-xmlParseNameComplex with XML_PARSE_OLD10
-========================================
-
-When parsing Names inside an expanded parameter entity with the
-XML_PARSE_OLD10 option, xmlParseNameComplex would call xmlGROW via the
-GROW macro if the input buffer was exhausted. At the end of the
-parameter entity's replacement text, this function would then call
-xmlPopInput which invalidated the input buffer.
-
-There should be no need to invoke GROW in this situation because the
-buffer is grown periodically every XML_PARSER_CHUNK_SIZE characters and,
-at least for UTF-8, in xmlCurrentChar. This also matches the code path
-executed when XML_PARSE_OLD10 is not set.
-
-This fixes bugs 781205 (CVE-2017-9049) and 781361 (CVE-2017-9050).
-Thanks to Marcel Böhme and Thuan Pham for the report.
-
-Additional hardening
-====================
-
-A separate check was added in xmlParseNameComplex to validate the
-buffer size.
----
- Makefile.am                     | 18 ++++++++++++++++++
- parser.c                        | 18 ++++++++++--------
- result/errors10/781205.xml      |  0
- result/errors10/781205.xml.err  | 21 +++++++++++++++++++++
- result/errors10/781361.xml      |  0
- result/errors10/781361.xml.err  | 13 +++++++++++++
- result/valid/766956.xml         |  0
- result/valid/766956.xml.err     |  9 +++++++++
- result/valid/766956.xml.err.rdr | 10 ++++++++++
- runtest.c                       |  3 +++
- test/errors10/781205.xml        |  3 +++
- test/errors10/781361.xml        |  3 +++
- test/valid/766956.xml           |  2 ++
- test/valid/dtds/766956.dtd      |  2 ++
- 14 files changed, 94 insertions(+), 8 deletions(-)
- create mode 100644 result/errors10/781205.xml
- create mode 100644 result/errors10/781205.xml.err
- create mode 100644 result/errors10/781361.xml
- create mode 100644 result/errors10/781361.xml.err
- create mode 100644 result/valid/766956.xml
- create mode 100644 result/valid/766956.xml.err
- create mode 100644 result/valid/766956.xml.err.rdr
- create mode 100644 test/errors10/781205.xml
- create mode 100644 test/errors10/781361.xml
- create mode 100644 test/valid/766956.xml
- create mode 100644 test/valid/dtds/766956.dtd
-
-diff --git a/parser.c b/parser.c
-index df2efa55..a175ac4e 100644
---- a/parser.c
-+++ b/parser.c
-@@ -2121,7 +2121,6 @@ static void xmlGROW (xmlParserCtxtPtr ctxt) {
-       ctxt->input->line++; ctxt->input->col = 1;                      \
-     } else ctxt->input->col++;                                                
\
-     ctxt->input->cur += l;                            \
--    if (*ctxt->input->cur == '%') xmlParserHandlePEReference(ctxt);   \
-   } while (0)
- 
- #define CUR_CHAR(l) xmlCurrentChar(ctxt, &l)
-@@ -3412,13 +3411,6 @@ xmlParseNameComplex(xmlParserCtxtPtr ctxt) {
-           len += l;
-           NEXTL(l);
-           c = CUR_CHAR(l);
--          if (c == 0) {
--              count = 0;
--              GROW;
--                if (ctxt->instate == XML_PARSER_EOF)
--                    return(NULL);
--              c = CUR_CHAR(l);
--          }
-       }
-     }
-     if ((len > XML_MAX_NAME_LENGTH) &&
-@@ -3426,6 +3418,16 @@ xmlParseNameComplex(xmlParserCtxtPtr ctxt) {
-         xmlFatalErr(ctxt, XML_ERR_NAME_TOO_LONG, "Name");
-         return(NULL);
-     }
-+    if (ctxt->input->cur - ctxt->input->base < len) {
-+        /*
-+         * There were a couple of bugs where PERefs lead to to a change
-+         * of the buffer. Check the buffer size to avoid passing an invalid
-+         * pointer to xmlDictLookup.
-+         */
-+        xmlFatalErr(ctxt, XML_ERR_INTERNAL_ERROR,
-+                    "unexpected change of input buffer");
-+        return (NULL);
-+    }
-     if ((*ctxt->input->cur == '\n') && (ctxt->input->cur[-1] == '\r'))
-         return(xmlDictLookup(ctxt->dict, ctxt->input->cur - (len + 1), len));
-     return(xmlDictLookup(ctxt->dict, ctxt->input->cur - len, len));
-diff --git a/result/errors10/781205.xml b/result/errors10/781205.xml
-new file mode 100644
-index 00000000..e69de29b
-diff --git a/result/errors10/781205.xml.err b/result/errors10/781205.xml.err
-new file mode 100644
-index 00000000..da15c3f7
---- /dev/null
-+++ b/result/errors10/781205.xml.err
-@@ -0,0 +1,21 @@
-+Entity: line 1: parser error : internal error: xmlParseInternalSubset: error 
detected in Markup declaration
-+
-+ %a; 
-+    ^
-+Entity: line 1: 
-+<:0000
-+^
-+Entity: line 1: parser error : DOCTYPE improperly terminated
-+ %a; 
-+    ^
-+Entity: line 1: 
-+<:0000
-+^
-+namespace error : Failed to parse QName ':0000'
-+ %a; 
-+    ^
-+<:0000
-+      ^
-+./test/errors10/781205.xml:4: parser error : Couldn't find end of Start Tag 
:0000 line 1
-+
-+^
-diff --git a/result/errors10/781361.xml b/result/errors10/781361.xml
-new file mode 100644
-index 00000000..e69de29b
-diff --git a/result/errors10/781361.xml.err b/result/errors10/781361.xml.err
-new file mode 100644
-index 00000000..655f41a2
---- /dev/null
-+++ b/result/errors10/781361.xml.err
-@@ -0,0 +1,13 @@
-+./test/errors10/781361.xml:4: parser error : xmlParseElementDecl: 'EMPTY', 
'ANY' or '(' expected
-+
-+^
-+./test/errors10/781361.xml:4: parser error : internal error: 
xmlParseInternalSubset: error detected in Markup declaration
-+
-+
-+^
-+./test/errors10/781361.xml:4: parser error : DOCTYPE improperly terminated
-+
-+^
-+./test/errors10/781361.xml:4: parser error : Start tag expected, '<' not found
-+
-+^
-diff --git a/result/valid/766956.xml b/result/valid/766956.xml
-new file mode 100644
-index 00000000..e69de29b
-diff --git a/result/valid/766956.xml.err b/result/valid/766956.xml.err
-new file mode 100644
-index 00000000..34b1dae6
---- /dev/null
-+++ b/result/valid/766956.xml.err
-@@ -0,0 +1,9 @@
-+test/valid/dtds/766956.dtd:2: parser error : PEReference: expecting ';'
-+%ä%ent;
-+   ^
-+Entity: line 1: parser error : Content error in the external subset
-+ %ent; 
-+      ^
-+Entity: line 1: 
-+value
-+^
-diff --git a/result/valid/766956.xml.err.rdr b/result/valid/766956.xml.err.rdr
-new file mode 100644
-index 00000000..77603462
---- /dev/null
-+++ b/result/valid/766956.xml.err.rdr
-@@ -0,0 +1,10 @@
-+test/valid/dtds/766956.dtd:2: parser error : PEReference: expecting ';'
-+%ä%ent;
-+   ^
-+Entity: line 1: parser error : Content error in the external subset
-+ %ent; 
-+      ^
-+Entity: line 1: 
-+value
-+^
-+./test/valid/766956.xml : failed to parse
-diff --git a/runtest.c b/runtest.c
-index b2ce693b..378b38e3 100644
---- a/runtest.c
-+++ b/runtest.c
-@@ -4214,6 +4214,9 @@ testDesc testDescriptions[] = {
-     { "Error cases regression tests",
-       errParseTest, "./test/errors/*.xml", "result/errors/", "", ".err",
-       0 },
-+    { "Error cases regression tests (old 1.0)",
-+      errParseTest, "./test/errors10/*.xml", "result/errors10/", "", ".err",
-+      XML_PARSE_OLD10 },
- #ifdef LIBXML_READER_ENABLED
-     { "Error cases stream regression tests",
-       streamParseTest, "./test/errors/*.xml", "result/errors/", NULL, ".str",
-diff --git a/test/errors10/781205.xml b/test/errors10/781205.xml
-new file mode 100644
-index 00000000..d9e9e839
---- /dev/null
-+++ b/test/errors10/781205.xml
-@@ -0,0 +1,3 @@
-+<!DOCTYPE D [
-+  <!ENTITY % a "<:0000">
-+  %a;
-diff --git a/test/errors10/781361.xml b/test/errors10/781361.xml
-new file mode 100644
-index 00000000..67476bcb
---- /dev/null
-+++ b/test/errors10/781361.xml
-@@ -0,0 +1,3 @@
-+<!DOCTYPE doc [
-+  <!ENTITY % elem "<!ELEMENT e0000000000">
-+  %elem;
-diff --git a/test/valid/766956.xml b/test/valid/766956.xml
-new file mode 100644
-index 00000000..19a95a0e
---- /dev/null
-+++ b/test/valid/766956.xml
-@@ -0,0 +1,2 @@
-+<!DOCTYPE test SYSTEM "dtds/766956.dtd">
-+<test/>
-diff --git a/test/valid/dtds/766956.dtd b/test/valid/dtds/766956.dtd
-new file mode 100644
-index 00000000..dddde68b
---- /dev/null
-+++ b/test/valid/dtds/766956.dtd
-@@ -0,0 +1,2 @@
-+<!ENTITY % ent "value">
-+%ä%ent;
--- 
-2.13.5
-
diff --git 
a/external/libxml2/0001-Fix-type-confusion-in-xmlValidateOneNamespace.patch.1 
b/external/libxml2/0001-Fix-type-confusion-in-xmlValidateOneNamespace.patch.1
deleted file mode 100644
index f0c4e6d5dba5..000000000000
--- 
a/external/libxml2/0001-Fix-type-confusion-in-xmlValidateOneNamespace.patch.1
+++ /dev/null
@@ -1,43 +0,0 @@
-From 92b9e8c8b3787068565a1820ba575d042f9eec66 Mon Sep 17 00:00:00 2001
-From: Nick Wellnhofer <wellnho...@aevum.de>
-Date: Tue, 6 Jun 2017 12:56:28 +0200
-Subject: [PATCH] Fix type confusion in xmlValidateOneNamespace
-
-Comment out code that casts xmlNsPtr to xmlAttrPtr. ID types on
-namespace declarations make no practical sense anyway.
-
-Fixes bug 780228.
-
-Found with libFuzzer and ASan.
----
- valid.c | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/valid.c b/valid.c
-index 8075d3a0..c51ea290 100644
---- a/valid.c
-+++ b/valid.c
-@@ -4627,6 +4627,12 @@ xmlNodePtr elem, const xmlChar *prefix, xmlNsPtr ns, 
const xmlChar *value) {
-       }
-     }
- 
-+    /*
-+     * Casting ns to xmlAttrPtr is wrong. We'd need separate functions
-+     * xmlAddID and xmlAddRef for namespace declarations, but it makes
-+     * no practical sense to use ID types anyway.
-+     */
-+#if 0
-     /* Validity Constraint: ID uniqueness */
-     if (attrDecl->atype == XML_ATTRIBUTE_ID) {
-         if (xmlAddID(ctxt, doc, value, (xmlAttrPtr) ns) == NULL)
-@@ -4638,6 +4644,7 @@ xmlNodePtr elem, const xmlChar *prefix, xmlNsPtr ns, 
const xmlChar *value) {
-         if (xmlAddRef(ctxt, doc, value, (xmlAttrPtr) ns) == NULL)
-           ret = 0;
-     }
-+#endif
- 
-     /* Validity Constraint: Notation Attributes */
-     if (attrDecl->atype == XML_ATTRIBUTE_NOTATION) {
--- 
-2.13.5
-
diff --git 
a/external/libxml2/0001-Increase-buffer-space-for-port-in-HTTP-redirect-supp.patch.1
 
b/external/libxml2/0001-Increase-buffer-space-for-port-in-HTTP-redirect-supp.patch.1
deleted file mode 100644
index fa90247f5e23..000000000000
--- 
a/external/libxml2/0001-Increase-buffer-space-for-port-in-HTTP-redirect-supp.patch.1
+++ /dev/null
@@ -1,31 +0,0 @@
-From 5dca9eea1bd4263bfa4d037ab2443de1cd730f7e Mon Sep 17 00:00:00 2001
-From: Daniel Veillard <veill...@redhat.com>
-Date: Fri, 7 Apr 2017 17:13:28 +0200
-Subject: [PATCH] Increase buffer space for port in HTTP redirect support
-
-For https://bugzilla.gnome.org/show_bug.cgi?id=780690
-
-nanohttp.c: the code wrongly assumed a short int port value.
----
- nanohttp.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/nanohttp.c b/nanohttp.c
-index e109ad75..373425de 100644
---- a/nanohttp.c
-+++ b/nanohttp.c
-@@ -1423,9 +1423,9 @@ retry:
-     if (ctxt->port != 80) {
-       /* reserve space for ':xxxxx', incl. potential proxy */
-       if (proxy)
--          blen += 12;
-+          blen += 17;
-       else
--          blen += 6;
-+          blen += 11;
-     }
-     bp = (char*)xmlMallocAtomic(blen);
-     if ( bp == NULL ) {
--- 
-2.13.5
-
diff --git 
a/external/libxml2/0001-Prevent-unwanted-external-entity-reference.patch.1 
b/external/libxml2/0001-Prevent-unwanted-external-entity-reference.patch.1
deleted file mode 100644
index 7a935a6ada60..000000000000
--- a/external/libxml2/0001-Prevent-unwanted-external-entity-reference.patch.1
+++ /dev/null
@@ -1,35 +0,0 @@
-From 90ccb58242866b0ba3edbef8fe44214a101c2b3e Mon Sep 17 00:00:00 2001
-From: Neel Mehta <nme...@google.com>
-Date: Fri, 7 Apr 2017 17:43:02 +0200
-Subject: [PATCH] Prevent unwanted external entity reference
-
-For https://bugzilla.gnome.org/show_bug.cgi?id=780691
-
-* parser.c: add a specific check to avoid PE reference
----
- parser.c | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/parser.c b/parser.c
-index 609a2703..c2c812de 100644
---- a/parser.c
-+++ b/parser.c
-@@ -8123,6 +8123,15 @@ xmlParsePEReference(xmlParserCtxtPtr ctxt)
-           if (xmlPushInput(ctxt, input) < 0)
-               return;
-       } else {
-+          if ((entity->etype == XML_EXTERNAL_PARAMETER_ENTITY) &&
-+              ((ctxt->options & XML_PARSE_NOENT) == 0) &&
-+              ((ctxt->options & XML_PARSE_DTDVALID) == 0) &&
-+              ((ctxt->options & XML_PARSE_DTDLOAD) == 0) &&
-+              ((ctxt->options & XML_PARSE_DTDATTR) == 0) &&
-+              (ctxt->replaceEntities == 0) &&
-+              (ctxt->validate == 0))
-+              return;
-+
-           /*
-            * TODO !!!
-            * handle the extra spaces added before and after
--- 
-2.13.5
-
diff --git a/external/libxml2/ExternalPackage_xml2.mk 
b/external/libxml2/ExternalPackage_xml2.mk
index b89b054a2b68..b620699ef453 100644
--- a/external/libxml2/ExternalPackage_xml2.mk
+++ b/external/libxml2/ExternalPackage_xml2.mk
@@ -25,7 +25,7 @@ $(eval $(call 
gb_ExternalPackage_add_file,xml2,$(LIBO_URE_LIB_FOLDER)/libxml2.dl
 $(eval $(call 
gb_ExternalPackage_add_file,xml2,$(LIBO_LIB_FOLDER)/libxml2.dll,win32/bin.msvc/libxml2.dll))
 endif
 else # OS!=WNT
-$(eval $(call 
gb_ExternalPackage_add_file,xml2,$(LIBO_URE_LIB_FOLDER)/libxml2.so.2,.libs/libxml2.so.2.9.4))
+$(eval $(call 
gb_ExternalPackage_add_file,xml2,$(LIBO_URE_LIB_FOLDER)/libxml2.so.2,.libs/libxml2.so.2.9.5))
 endif
 endif # DISABLE_DYNLOADING
 
diff --git a/external/libxml2/UnpackedTarball_xml2.mk 
b/external/libxml2/UnpackedTarball_xml2.mk
index 17203bfb179e..5ecd2dd1b42c 100644
--- a/external/libxml2/UnpackedTarball_xml2.mk
+++ b/external/libxml2/UnpackedTarball_xml2.mk
@@ -16,12 +16,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,xml2,\
        external/libxml2/libxml2-global-symbols.patch \
        external/libxml2/libxml2-vc10.patch \
        $(if $(filter ANDROID,$(OS)),external/libxml2/libxml2-android.patch) \
-       
external/libxml2/0001-Fix-type-confusion-in-xmlValidateOneNamespace.patch.1 \
-       
external/libxml2/0001-Prevent-unwanted-external-entity-reference.patch.1 \
-       
external/libxml2/0001-Increase-buffer-space-for-port-in-HTTP-redirect-supp.patch.1
 \
-       
external/libxml2/0001-Fix-buffer-size-checks-in-xmlSnprintfElementContent.patch.1
 \
-       
external/libxml2/0001-Fix-handling-of-parameter-entity-references.patch.1 \
-       external/libxml2/libxml2-no-c99.patch \
 ))
+#      external/libxml2/libxml2-no-c99.patch \
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/libxml2/libxml2-android.patch 
b/external/libxml2/libxml2-android.patch
index 53011e19e1b4..fb18f36b28fa 100644
--- a/external/libxml2/libxml2-android.patch
+++ b/external/libxml2/libxml2-android.patch
@@ -28,7 +28,7 @@
 --- misc/libxml2-2.7.6/Makefile.in
 +++ misc/build/libxml2-2.7.6/Makefile.in
 @@ -1635,7 +1635,7 @@
- check-am: all-am
+       $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
  check: $(BUILT_SOURCES)
        $(MAKE) $(AM_MAKEFLAGS) check-recursive
 -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA) \
commit d7953c60c93622e64f36c2b39359b977bc4e86ee
Author:     Michael Stahl <michael.st...@cib.de>
AuthorDate: Wed Nov 20 15:08:24 2019 +0100
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Thu Oct 1 08:35:19 2020 +0200

    libxslt: upgrade to release 1.1.34
    
    Fixes CVE-2019-18197.
    
    Remove obsolete e03553605b45c88f0b4b2980adfbbb8f6fca2fd6.patch.1.
    
    Reviewed-on: https://gerrit.libreoffice.org/83312
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@cib.de>
    (cherry picked from commit e9ea24cc004a8b9a5856f2f268bd40433c504db1)
    Reviewed-on: https://gerrit.libreoffice.org/83377
    (cherry picked from commit d19b32c779bfeb51ef9570c3de8ed1925ec44473)
    
    Conflicts:
            download.lst
            external/libxslt/UnpackedTarball_xslt.mk
    
    Change-Id: I95cf498e245083528f98bfef8cdd240bbe2211b9

diff --git a/download.lst b/download.lst
index 81d84f68cf6c..a928fab70c2b 100644
--- a/download.lst
+++ b/download.lst
@@ -94,8 +94,8 @@ export LIBEXTTEXTCAT_TARBALL := 
ae330b9493bd4503ac390106ff6060d7-libexttextcat-3
 export LIBLANGTAG_TARBALL := 
36271d3fa0d9dec1632029b6d7aac925-liblangtag-0.5.1.tar.bz2
 export LIBXMLSEC_TARBALL := 
1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz
 export LIBXML_TARBALL := ae249165c173b1ff386ee8ad676815f5-libxml2-2.9.4.tar.gz
-export LIBXSLT_MD5SUM := b3bd254a03e46d58f8ad1e4559cd2c2f
-export LIBXSLT_VERSION_MICRO := 33
+export LIBXSLT_MD5SUM := db8765c8d076f1b6caafd9f2542a304a
+export LIBXSLT_VERSION_MICRO := 34
 export LIBXSLT_TARBALL := libxslt-1.1.$(LIBXSLT_VERSION_MICRO).tar.gz
 export LPSOLVE_TARBALL := 26b3e95ddf3d9c077c480ea45874b3b8-lp_solve_5.5.tar.gz
 export MARIADB_TARBALL := 
05f84c95b610c21c5fd510d10debcabf-mariadb-native-client-1.0.0.tar.bz2
diff --git a/external/libxslt/UnpackedTarball_xslt.mk 
b/external/libxslt/UnpackedTarball_xslt.mk
index c2d9827a3e5c..a739af5508be 100644
--- a/external/libxslt/UnpackedTarball_xslt.mk
+++ b/external/libxslt/UnpackedTarball_xslt.mk
@@ -16,7 +16,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,xslt,\
        external/libxslt/libxslt-internal-symbols.patch.1 \
        external/libxslt/libxslt-msvc.patch.2 \
        external/libxslt/libxslt-1.1.26-memdump.patch \
-       external/libxslt/e03553605b45c88f0b4b2980adfbbb8f6fca2fd6.patch.1 \
+       external/libxslt/e2584eed1c84c18f16e42188c30d2c3d8e3e8853.patch.1 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/libxslt/e03553605b45c88f0b4b2980adfbbb8f6fca2fd6.patch.1 
b/external/libxslt/e03553605b45c88f0b4b2980adfbbb8f6fca2fd6.patch.1
deleted file mode 100644
index 260f35d1a35e..000000000000
--- a/external/libxslt/e03553605b45c88f0b4b2980adfbbb8f6fca2fd6.patch.1
+++ /dev/null
@@ -1,120 +0,0 @@
-From e03553605b45c88f0b4b2980adfbbb8f6fca2fd6 Mon Sep 17 00:00:00 2001
-From: Nick Wellnhofer <wellnho...@aevum.de>
-Date: Sun, 24 Mar 2019 09:51:39 +0100
-Subject: [PATCH] Fix security framework bypass
-
-xsltCheckRead and xsltCheckWrite return -1 in case of error but callers
-don't check for this condition and allow access. With a specially
-crafted URL, xsltCheckRead could be tricked into returning an error
-because of a supposedly invalid URL that would still be loaded
-succesfully later on.
-
-Fixes #12.
-
-Thanks to Felix Wilhelm for the report.
----
- libxslt/documents.c | 18 ++++++++++--------
- libxslt/imports.c   |  9 +++++----
- libxslt/transform.c |  9 +++++----
- libxslt/xslt.c      |  9 +++++----
- 4 files changed, 25 insertions(+), 20 deletions(-)
-
-diff --git a/libxslt/documents.c b/libxslt/documents.c
-index 3f3a7312..4aad11bb 100644
---- a/libxslt/documents.c
-+++ b/libxslt/documents.c
-@@ -296,10 +296,11 @@ xsltLoadDocument(xsltTransformContextPtr ctxt, const 
xmlChar *URI) {
-       int res;
- 
-       res = xsltCheckRead(ctxt->sec, ctxt, URI);
--      if (res == 0) {
--          xsltTransformError(ctxt, NULL, NULL,
--               "xsltLoadDocument: read rights for %s denied\n",
--                           URI);
-+      if (res <= 0) {
-+            if (res == 0)
-+                xsltTransformError(ctxt, NULL, NULL,
-+                     "xsltLoadDocument: read rights for %s denied\n",
-+                                 URI);
-           return(NULL);
-       }
-     }
-@@ -372,10 +373,11 @@ xsltLoadStyleDocument(xsltStylesheetPtr style, const 
xmlChar *URI) {
-       int res;
- 
-       res = xsltCheckRead(sec, NULL, URI);
--      if (res == 0) {
--          xsltTransformError(NULL, NULL, NULL,
--               "xsltLoadStyleDocument: read rights for %s denied\n",
--                           URI);
-+      if (res <= 0) {
-+            if (res == 0)
-+                xsltTransformError(NULL, NULL, NULL,
-+                     "xsltLoadStyleDocument: read rights for %s denied\n",
-+                                 URI);
-           return(NULL);
-       }
-     }
-diff --git a/libxslt/imports.c b/libxslt/imports.c
-index 874870cc..3783b247 100644
---- a/libxslt/imports.c
-+++ b/libxslt/imports.c
-@@ -130,10 +130,11 @@ xsltParseStylesheetImport(xsltStylesheetPtr style, 
xmlNodePtr cur) {
-       int secres;
- 
-       secres = xsltCheckRead(sec, NULL, URI);
--      if (secres == 0) {
--          xsltTransformError(NULL, NULL, NULL,
--               "xsl:import: read rights for %s denied\n",
--                           URI);
-+      if (secres <= 0) {
-+            if (secres == 0)
-+                xsltTransformError(NULL, NULL, NULL,
-+                     "xsl:import: read rights for %s denied\n",
-+                                 URI);
-           goto error;
-       }
-     }
-diff --git a/libxslt/transform.c b/libxslt/transform.c
-index 13793914..0636dbd0 100644
---- a/libxslt/transform.c
-+++ b/libxslt/transform.c
-@@ -3493,10 +3493,11 @@ xsltDocumentElem(xsltTransformContextPtr ctxt, 
xmlNodePtr node,
-      */
-     if (ctxt->sec != NULL) {
-       ret = xsltCheckWrite(ctxt->sec, ctxt, filename);
--      if (ret == 0) {
--          xsltTransformError(ctxt, NULL, inst,
--               "xsltDocumentElem: write rights for %s denied\n",
--                           filename);
-+      if (ret <= 0) {
-+            if (ret == 0)
-+                xsltTransformError(ctxt, NULL, inst,
-+                     "xsltDocumentElem: write rights for %s denied\n",
-+                                 filename);
-           xmlFree(URL);
-           xmlFree(filename);
-           return;
-diff --git a/libxslt/xslt.c b/libxslt/xslt.c
-index 780a5ad7..a234eb79 100644
---- a/libxslt/xslt.c
-+++ b/libxslt/xslt.c
-@@ -6763,10 +6763,11 @@ xsltParseStylesheetFile(const xmlChar* filename) {
-       int res;
- 
-       res = xsltCheckRead(sec, NULL, filename);
--      if (res == 0) {
--          xsltTransformError(NULL, NULL, NULL,
--               "xsltParseStylesheetFile: read rights for %s denied\n",
--                           filename);
-+      if (res <= 0) {
-+            if (res == 0)
-+                xsltTransformError(NULL, NULL, NULL,
-+                     "xsltParseStylesheetFile: read rights for %s denied\n",
-+                                 filename);
-           return(NULL);
-       }
-     }
--- 
-2.18.1
-
diff --git a/external/libxslt/e2584eed1c84c18f16e42188c30d2c3d8e3e8853.patch.1 
b/external/libxslt/e2584eed1c84c18f16e42188c30d2c3d8e3e8853.patch.1
new file mode 100644
index 000000000000..f82c2e4f77ee
--- /dev/null
+++ b/external/libxslt/e2584eed1c84c18f16e42188c30d2c3d8e3e8853.patch.1
@@ -0,0 +1,69 @@
+From e2584eed1c84c18f16e42188c30d2c3d8e3e8853 Mon Sep 17 00:00:00 2001
+From: Chun-wei Fan <fanchun...@src.gnome.org>
+Date: Tue, 12 Nov 2019 17:37:05 +0800
+Subject: [PATCH] win32: Add configuration for profiler
+
+Without this the generated xsltconfig.h will not be complete as there
+will be a configuration variable that is left in the header, breaking
+builds.
+
+This will allow one to enable or disable profiler support in Windows
+builds, and the default is to enable this.
+---
+ win32/configure.js | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/win32/configure.js b/win32/configure.js
+index 56694cce..12c99f30 100644
+--- a/win32/configure.js
++++ b/win32/configure.js
+@@ -47,6 +47,7 @@ var withIconv = true;
+ var withZlib = false;
+ var withCrypto = true;
+ var withModules = false;
++var withProfiler = true;
+ /* Win32 build options. */
+ var dirSep = "\\";
+ var compiler = "msvc";
+@@ -106,6 +107,7 @@ function usage()
+       txt += "  zlib:       Use zlib library (" + (withZlib? "yes" : "no") + 
")\n";
+       txt += "  crypto:     Enable Crypto support (" + (withCrypto? "yes" : 
"no") + ")\n";
+       txt += "  modules:    Enable Module support (" + (withModules? "yes" : 
"no") + ")\n";
++      txt += "  profiler:   Enable Profiler support (" + (withProfiler? "yes" 
: "no") + ")\n";
+       txt += "\nWin32 build options, default value given in parentheses:\n\n";
+       txt += "  compiler:   Compiler to be used [msvc|mingw] (" + compiler + 
")\n";
+       txt += "  cruntime:   C-runtime compiler option (only msvc) (" + 
cruntime + ")\n";
+@@ -192,6 +194,7 @@ function discoverVersion()
+       vf.WriteLine("WITH_ZLIB=" + (withZlib? "1" : "0"));
+       vf.WriteLine("WITH_CRYPTO=" + (withCrypto? "1" : "0"));
+       vf.WriteLine("WITH_MODULES=" + (withModules? "1" : "0"));
++      vf.WriteLine("WITH_PROFILER=" + (withProfiler? "1" : "0"));
+       vf.WriteLine("DEBUG=" + (buildDebug? "1" : "0"));
+       vf.WriteLine("STATIC=" + (buildStatic? "1" : "0"));
+       vf.WriteLine("PREFIX=" + buildPrefix);
+@@ -240,6 +243,8 @@ function configureXslt()
+                       of.WriteLine(s.replace(/\@WITH_DEBUGGER\@/, 
withDebugger? "1" : "0"));
+               } else if (s.search(/\@WITH_MODULES\@/) != -1) {
+                       of.WriteLine(s.replace(/\@WITH_MODULES\@/, withModules? 
"1" : "0"));
++              } else if (s.search(/\@WITH_PROFILER\@/) != -1) {
++                      of.WriteLine(s.replace(/\@WITH_PROFILER\@/, 
withProfiler? "1" : "0"));
+               } else if (s.search(/\@LIBXSLT_DEFAULT_PLUGINS_PATH\@/) != -1) {
+                       
of.WriteLine(s.replace(/\@LIBXSLT_DEFAULT_PLUGINS_PATH\@/, "NULL"));
+               } else
+@@ -343,6 +348,8 @@ for (i = 0; (i < WScript.Arguments.length) && (error == 
0); i++) {
+                       withCrypto = strToBool(arg.substring(opt.length + 1, 
arg.length));
+               else if (opt == "modules")
+                       withModules = strToBool(arg.substring(opt.length + 1, 
arg.length));
++              else if (opt == "profiler")
++                      withProfiler = strToBool(arg.substring(opt.length + 1, 
arg.length));
+               else if (opt == "compiler")
+                       compiler = arg.substring(opt.length + 1, arg.length);
+               else if (opt == "cruntime")
+@@ -477,6 +484,7 @@ txtOut += "         Use iconv: " + boolToStr(withIconv) + 
"\n";
+ txtOut += "         With zlib: " + boolToStr(withZlib) + "\n";
+ txtOut += "            Crypto: " + boolToStr(withCrypto) + "\n";
+ txtOut += "           Modules: " + boolToStr(withModules) + "\n";
++txtOut += "          Profiler: " + boolToStr(withProfiler) + "\n";
+ txtOut += "\n";
+ txtOut += "Win32 build configuration\n";
+ txtOut += "-------------------------\n";
diff --git a/external/libxslt/libxslt-config.patch.1 
b/external/libxslt/libxslt-config.patch.1
index dc33871398cc..6360d8cce512 100644
--- a/external/libxslt/libxslt-config.patch.1
+++ b/external/libxslt/libxslt-config.patch.1
@@ -23,13 +23,13 @@ Hack the xslt-config to return paths into WORKDIR.
  
  usage()
  {
-@@ -89,7 +95,8 @@
-     shift
- done
+@@ -92,7 +98,8 @@
+             libs="@XSLT_LIBDIR@ $libs"
+         fi
  
--the_libs="@XSLT_LIBDIR@ @XSLT_LIBS@ @EXTRA_LIBS@"
-+#the_libs="@XSLT_LIBDIR@ @XSLT_LIBS@ @EXTRA_LIBS@"
-+the_libs="-L${libdir} -lxslt -lm"
- if test "$includedir" != "/usr/include"; then
-     the_flags="$the_flags -I$includedir `@XML_CONFIG@ --cflags`"
- else
+-        libs="$libs @EXTRA_LIBS@"
++        #libs="$libs @EXTRA_LIBS@"
++        libs="-L${libdir}/libxslt/.libs -L${libdir}/libexslt/.libs -lxslt -lm"
+               ;;
+ 
+     *)
diff --git a/external/libxslt/libxslt-internal-symbols.patch.1 
b/external/libxslt/libxslt-internal-symbols.patch.1
index 7b13e1007c00..84a15154d729 100644
--- a/external/libxslt/libxslt-internal-symbols.patch.1
+++ b/external/libxslt/libxslt-internal-symbols.patch.1
@@ -1,13 +1,13 @@
 --- xslt/libxslt/libxslt.syms.orig     2017-09-05 16:25:50.504966267 +0200
 +++ xslt/libxslt/libxslt.syms  2017-09-05 16:41:00.256895709 +0200
 @@ -497,5 +497,10 @@
- # xsltInternals
-   xsltFlagRVTs;
-   xsltDecimalFormatGetByQName;
+ 
+ # pattern
+   xsltCompMatchClearCache;
 +
 +# Solaris ld needs explicit auto-reduction (or, alternatively, "-B local")
 +    local:
 +  *;
 +
- } LIBXML2_1.1.27;
+ } LIBXML2_1.1.30;
  
commit 6f7a1db17ed6820651166f8d143f6cac8777eb15
Author:     Michael Stahl <michael.st...@cib.de>
AuthorDate: Mon Jan 14 15:52:00 2019 +0100
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Thu Oct 1 08:35:18 2020 +0200

    libxslt: upgrade to release 1.1.33
    
    Reviewed-on: https://gerrit.libreoffice.org/66309
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@cib.de>
    (cherry picked from commit 3f720ac5ff65ddb2c0a06e48d0e2e9bec29f3a43)
    Reviewed-on: https://gerrit.libreoffice.org/66364
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>
    (cherry picked from commit efe7b735104343e5e0182e1b004aca9c7b79a901)
    
    Conflicts:
            download.lst
    
    Change-Id: Ifc64dae74df341e107857e43223ead04b9c1061e

diff --git a/download.lst b/download.lst
index b6363dcce2ec..81d84f68cf6c 100644
--- a/download.lst
+++ b/download.lst
@@ -94,8 +94,8 @@ export LIBEXTTEXTCAT_TARBALL := 
ae330b9493bd4503ac390106ff6060d7-libexttextcat-3
 export LIBLANGTAG_TARBALL := 
36271d3fa0d9dec1632029b6d7aac925-liblangtag-0.5.1.tar.bz2
 export LIBXMLSEC_TARBALL := 
1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz
 export LIBXML_TARBALL := ae249165c173b1ff386ee8ad676815f5-libxml2-2.9.4.tar.gz
-export LIBXSLT_MD5SUM := 1fc72f98e98bf4443f1651165f3aa146
-export LIBXSLT_VERSION_MICRO := 32
+export LIBXSLT_MD5SUM := b3bd254a03e46d58f8ad1e4559cd2c2f
+export LIBXSLT_VERSION_MICRO := 33
 export LIBXSLT_TARBALL := libxslt-1.1.$(LIBXSLT_VERSION_MICRO).tar.gz
 export LPSOLVE_TARBALL := 26b3e95ddf3d9c077c480ea45874b3b8-lp_solve_5.5.tar.gz
 export MARIADB_TARBALL := 
05f84c95b610c21c5fd510d10debcabf-mariadb-native-client-1.0.0.tar.bz2
commit 45fd51f5628b8ff1d07b472e8adfe369036649b6
Author:     David Tardon <dtar...@redhat.com>
AuthorDate: Tue Nov 7 19:50:04 2017 +0100
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Thu Oct 1 08:35:18 2020 +0200

    upload libxslt 1.1.32
    
    Reviewed-on: https://gerrit.libreoffice.org/44422
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: David Tardon <dtar...@redhat.com>
    (cherry picked from commit c110dabbf0fcddf9da2e61d66ca093cf6e6c57a1)
    
    Conflicts:
            download.lst
    
    Change-Id: Idee2f18dccdf309027142137683ac86735f575cc

diff --git a/download.lst b/download.lst
index cda937e06284..b6363dcce2ec 100644
--- a/download.lst
+++ b/download.lst
@@ -94,8 +94,9 @@ export LIBEXTTEXTCAT_TARBALL := 
ae330b9493bd4503ac390106ff6060d7-libexttextcat-3
 export LIBLANGTAG_TARBALL := 
36271d3fa0d9dec1632029b6d7aac925-liblangtag-0.5.1.tar.bz2
 export LIBXMLSEC_TARBALL := 
1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz
 export LIBXML_TARBALL := ae249165c173b1ff386ee8ad676815f5-libxml2-2.9.4.tar.gz
-export LIBXSLT_MD5SUM := 70becbbcb1dad55f14de0b84171b91d5
-export LIBXSLT_TARBALL := libxslt-1.1.30.tar.gz
+export LIBXSLT_MD5SUM := 1fc72f98e98bf4443f1651165f3aa146
+export LIBXSLT_VERSION_MICRO := 32
+export LIBXSLT_TARBALL := libxslt-1.1.$(LIBXSLT_VERSION_MICRO).tar.gz
 export LPSOLVE_TARBALL := 26b3e95ddf3d9c077c480ea45874b3b8-lp_solve_5.5.tar.gz
 export MARIADB_TARBALL := 
05f84c95b610c21c5fd510d10debcabf-mariadb-native-client-1.0.0.tar.bz2
 export MDDS_TARBALL := a67a46ec9d00d283a7cd8dbdd2906b59-mdds_0.11.0.tar.bz2
diff --git a/external/libxslt/ExternalPackage_xslt.mk 
b/external/libxslt/ExternalPackage_xslt.mk
index 4354bd4b6191..f0fd5336297d 100644
--- a/external/libxslt/ExternalPackage_xslt.mk
+++ b/external/libxslt/ExternalPackage_xslt.mk
@@ -24,8 +24,8 @@ $(eval $(call 
gb_ExternalPackage_add_file,xslt,$(LIBO_LIB_FOLDER)/libxslt.dll,wi
 $(eval $(call 
gb_ExternalPackage_add_file,xslt,$(LIBO_LIB_FOLDER)/libexslt.dll,win32/bin.msvc/libexslt.dll))
 endif
 else # OS!=WNT
-$(eval $(call 
gb_ExternalPackage_add_file,xslt,$(LIBO_LIB_FOLDER)/libxslt.so.1,libxslt/.libs/libxslt.so.1.1.30))
-$(eval $(call 
gb_ExternalPackage_add_file,xslt,$(LIBO_LIB_FOLDER)/libexslt.so.0,libexslt/.libs/libexslt.so.0.8.18))
+$(eval $(call 
gb_ExternalPackage_add_file,xslt,$(LIBO_LIB_FOLDER)/libxslt.so.1,libxslt/.libs/libxslt.so.1.1.$(LIBXSLT_VERSION_MICRO)))
+$(eval $(call 
gb_ExternalPackage_add_file,xslt,$(LIBO_LIB_FOLDER)/libexslt.so.0,libexslt/.libs/libexslt.so.0.8.20))
 endif
 endif # DISABLE_DYNLOADING
 
diff --git a/external/libxslt/libxslt-msvc.patch.2 
b/external/libxslt/libxslt-msvc.patch.2
index d5b01dab2c25..19343a782511 100644
--- a/external/libxslt/libxslt-msvc.patch.2
+++ b/external/libxslt/libxslt-msvc.patch.2
@@ -1,7 +1,7 @@
 --- build/libxslt-1.1.26/win32/Makefile.msvc.old       2010-10-20 
01:02:55.359375000 +0200
 +++ build/libxslt-1.1.26/win32/Makefile.msvc   2010-10-20 01:03:05.187500000 
+0200
 @@ -54,6 +54,7 @@
- CFLAGS = /nologo /D "WIN32" /D "_WINDOWS" /D "_MBCS" /W3 $(CRUNTIME) /D 
"_REENTRANT"
+ CFLAGS = /nologo /D "_WINDOWS" /D "_MBCS" /W3 /wd4244 /wd4267 $(CRUNTIME) /D 
"_REENTRANT"
  CFLAGS = $(CFLAGS) /I$(BASEDIR) /I$(XSLT_SRCDIR) /I$(INCPREFIX)
  CFLAGS = $(CFLAGS) /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
 +CFLAGS = $(CFLAGS) $(SOLARINC) -I$(WORKDIR)\UnpackedTarball\xml2\include
commit 270c8e7f5f5d42e4a9e87f0473404ee502a02d2c
Author:     Michael Stahl <mst...@redhat.com>
AuthorDate: Tue Sep 5 16:55:50 2017 +0200
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Thu Oct 1 08:35:17 2020 +0200

    libxslt: upgrade to release 1.1.30
    
    * drop most of libxslt-internal-symbols.patch, fixed upstream
    
    Reviewed-on: https://gerrit.libreoffice.org/41947
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Michael Stahl <mst...@redhat.com>
    (cherry picked from commit 1d7b3cbe1f08319eddf88aac04923ae44873f246)
    
    Conflicts:
            download.lst
    
    Change-Id: I59cf57a4d3139ad5fa0e5ce1a6cdaaa568ae3a40

diff --git a/Makefile.fetch b/Makefile.fetch
index cd4e8d3f6336..5961c9d3a5de 100644
--- a/Makefile.fetch
+++ b/Makefile.fetch
@@ -96,6 +96,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_host.mk 
$(SRCDIR)/download.lst $(SRCDIR)
                $(call fetch_Optional,PYTHON,PYTHON_TARBALL) \
                $(call fetch_Optional,VISIO,VISIO_TARBALL) \
                $(call fetch_Optional,ZLIB,ZLIB_TARBALL) \
+               $(call fetch_Optional,LIBXSLT,LIBXSLT_TARBALL) \
        ,$(call 
fetch_Download_item_special,https://dev-www.libreoffice.org/src,$(item)))
        $(foreach item, \
                $(call fetch_Optional,AFMS,$(AFMS_TARBALL)) \
@@ -149,7 +150,6 @@ $(WORKDIR)/download: $(BUILDDIR)/config_host.mk 
$(SRCDIR)/download.lst $(SRCDIR)
                $(call fetch_Optional,LIBLANGTAG,$(LIBLANGTAG_TARBALL)) \
                $(call fetch_Optional,LIBXML2,$(LIBXML_TARBALL)) \
                $(LIBXMLSEC_TARBALL) \
-               $(call fetch_Optional,LIBXSLT,$(LIBXSLT_TARBALL)) \
                $(call fetch_Optional,LPSOLVE,$(LPSOLVE_TARBALL)) \
                $(call fetch_Optional,MDDS,$(MDDS_TARBALL)) \
                $(call fetch_Optional,MYSQLCPPCONN,$(MYSQLCPPCONN_TARBALL)) \
diff --git a/download.lst b/download.lst
index 914fd760ccb4..cda937e06284 100644
--- a/download.lst
+++ b/download.lst
@@ -94,7 +94,8 @@ export LIBEXTTEXTCAT_TARBALL := 
ae330b9493bd4503ac390106ff6060d7-libexttextcat-3
 export LIBLANGTAG_TARBALL := 
36271d3fa0d9dec1632029b6d7aac925-liblangtag-0.5.1.tar.bz2
 export LIBXMLSEC_TARBALL := 
1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz
 export LIBXML_TARBALL := ae249165c173b1ff386ee8ad676815f5-libxml2-2.9.4.tar.gz
-export LIBXSLT_TARBALL := 
a129d3c44c022de3b9dcf6d6f288d72e-libxslt-1.1.29.tar.gz
+export LIBXSLT_MD5SUM := 70becbbcb1dad55f14de0b84171b91d5
+export LIBXSLT_TARBALL := libxslt-1.1.30.tar.gz
 export LPSOLVE_TARBALL := 26b3e95ddf3d9c077c480ea45874b3b8-lp_solve_5.5.tar.gz
 export MARIADB_TARBALL := 
05f84c95b610c21c5fd510d10debcabf-mariadb-native-client-1.0.0.tar.bz2
 export MDDS_TARBALL := a67a46ec9d00d283a7cd8dbdd2906b59-mdds_0.11.0.tar.bz2
diff --git a/external/libxslt/ExternalPackage_xslt.mk 
b/external/libxslt/ExternalPackage_xslt.mk
index 41c79a3fe462..4354bd4b6191 100644
--- a/external/libxslt/ExternalPackage_xslt.mk
+++ b/external/libxslt/ExternalPackage_xslt.mk
@@ -24,8 +24,8 @@ $(eval $(call 
gb_ExternalPackage_add_file,xslt,$(LIBO_LIB_FOLDER)/libxslt.dll,wi
 $(eval $(call 
gb_ExternalPackage_add_file,xslt,$(LIBO_LIB_FOLDER)/libexslt.dll,win32/bin.msvc/libexslt.dll))
 endif
 else # OS!=WNT
-$(eval $(call 
gb_ExternalPackage_add_file,xslt,$(LIBO_LIB_FOLDER)/libxslt.so.1,libxslt/.libs/libxslt.so.1.1.29))
-$(eval $(call 
gb_ExternalPackage_add_file,xslt,$(LIBO_LIB_FOLDER)/libexslt.so.0,libexslt/.libs/libexslt.so.0.8.17))
+$(eval $(call 
gb_ExternalPackage_add_file,xslt,$(LIBO_LIB_FOLDER)/libxslt.so.1,libxslt/.libs/libxslt.so.1.1.30))
+$(eval $(call 
gb_ExternalPackage_add_file,xslt,$(LIBO_LIB_FOLDER)/libexslt.so.0,libexslt/.libs/libexslt.so.0.8.18))
 endif
 endif # DISABLE_DYNLOADING
 
diff --git a/external/libxslt/UnpackedTarball_xslt.mk 
b/external/libxslt/UnpackedTarball_xslt.mk
index dd738106410f..c2d9827a3e5c 100644
--- a/external/libxslt/UnpackedTarball_xslt.mk
+++ b/external/libxslt/UnpackedTarball_xslt.mk
@@ -13,7 +13,7 @@ $(eval $(call 
gb_UnpackedTarball_set_tarball,xslt,$(LIBXSLT_TARBALL)))
 
 $(eval $(call gb_UnpackedTarball_add_patches,xslt,\
        external/libxslt/libxslt-config.patch.1 \
-       external/libxslt/libxslt-internal-symbols.patch \
+       external/libxslt/libxslt-internal-symbols.patch.1 \
        external/libxslt/libxslt-msvc.patch.2 \
        external/libxslt/libxslt-1.1.26-memdump.patch \
        external/libxslt/e03553605b45c88f0b4b2980adfbbb8f6fca2fd6.patch.1 \
diff --git a/external/libxslt/libxslt-internal-symbols.patch 
b/external/libxslt/libxslt-internal-symbols.patch
deleted file mode 100644
index 7023cb32354d..000000000000
--- a/external/libxslt/libxslt-internal-symbols.patch
+++ /dev/null
@@ -1,64 +0,0 @@
---- misc/libxslt-1.1.26/libxslt/libxslt.syms   Thu Sep 24 16:28:46 2009
-+++ misc/build/libxslt-1.1.26/libxslt/libxslt.syms     Thu Jul  8 12:22:14 2010
-@@ -107,7 +107,7 @@
-   xsltFreeCompMatchList;
-   xsltFreeTemplateHashes;
-   xsltGetTemplate;
--  xsltMatchPattern;
-+#NOT_IMPLEMENTED  xsltMatchPattern;
-   xsltTestCompMatchList;
- 
- # preproc
-@@ -406,7 +406,7 @@
-     global:
- 
- # xsltInternals
--  xsltConstNamespaceNameXSLT; # variable
-+#XSLT_REFACTORED_XSLT_NSCOMP  xsltConstNamespaceNameXSLT; # variable
-   xsltExtensionInstructionResultFinalize;
-   xsltExtensionInstructionResultRegister;
-   xsltInitCtxtKey;
-@@ -415,24 +415,24 @@
-   xsltInit;
- 
- # xsltInternals
--  xsltParseAnyXSLTElem;
--  xsltParseSequenceConstructor;
--  xsltPointerListAddSize;
--  xsltPointerListClear;
--  xsltPointerListCreate;
--  xsltPointerListFree;
-+#XSLT_REFACTORED  xsltParseAnyXSLTElem;
-+#XSLT_REFACTORED  xsltParseSequenceConstructor;
-+#XSLT_REFACTORED  xsltPointerListAddSize;
-+#XSLT_REFACTORED  xsltPointerListClear;
-+#XSLT_REFACTORED  xsltPointerListCreate;
-+#XSLT_REFACTORED  xsltPointerListFree;
-   xsltRegisterLocalRVT;
-   xsltReleaseRVT;
--  xsltRestoreDocumentNamespaces;
-+#XSLT_REFACTORED_XSLT_NSCOMP  xsltRestoreDocumentNamespaces;
- 
- # extensions
--  xsltStyleStylesheetLevelGetExtData;
-+#XSLT_REFACTORED  xsltStyleStylesheetLevelGetExtData;
- 
- # xsltInternals
- # xsltTransStorageAdd; removed in 1.1.28
- # xsltTransStorageRemove; removed in 1.1.28
-   xsltUninit;
--  xsltXSLTAttrMarker; # variable
-+#XSLT_REFACTORED  xsltXSLTAttrMarker; # variable
- } LIBXML2_1.1.9;
- 
- LIBXML2_1.1.20 {
-@@ -475,5 +475,9 @@
- 
- # xsltutils
-   xsltXPathCompileFlags;
-+
-+# Solaris ld needs explicit auto-reduction (or, alternatively, "-B local")
-+    local:
-+  *;
- } LIBXML2_1.1.26;
- 
diff --git a/external/libxslt/libxslt-internal-symbols.patch.1 
b/external/libxslt/libxslt-internal-symbols.patch.1
new file mode 100644
index 000000000000..7b13e1007c00
--- /dev/null
+++ b/external/libxslt/libxslt-internal-symbols.patch.1
@@ -0,0 +1,13 @@
+--- xslt/libxslt/libxslt.syms.orig     2017-09-05 16:25:50.504966267 +0200
++++ xslt/libxslt/libxslt.syms  2017-09-05 16:41:00.256895709 +0200
+@@ -497,5 +497,10 @@
+ # xsltInternals
+   xsltFlagRVTs;
+   xsltDecimalFormatGetByQName;
++
++# Solaris ld needs explicit auto-reduction (or, alternatively, "-B local")
++    local:
++  *;
++
+ } LIBXML2_1.1.27;
+ 
commit 4c602ab2e60b30687d65631a5dbb74b28c50aec8
Author:     Michael Stahl <michael.st...@cib.de>
AuthorDate: Wed Apr 17 14:50:10 2019 +0200
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Thu Oct 1 08:35:17 2020 +0200

    libxslt: add patch for CVE-2019-11068
    
    Reviewed-on: https://gerrit.libreoffice.org/70879
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@cib.de>
    (cherry picked from commit 2d85b75b1220484aebd6e583d6d7aee71280e38e)
    Reviewed-on: https://gerrit.libreoffice.org/70894
    Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>
    (cherry picked from commit 32948e7778b959ef1037d9be707a6bfc7db4160d)
    
    Conflicts:
            external/libxslt/UnpackedTarball_xslt.mk
    
    Change-Id: I3fe30de8140dce3d81cdfae7d41e0bd465b1d5f4

diff --git a/external/libxslt/UnpackedTarball_xslt.mk 
b/external/libxslt/UnpackedTarball_xslt.mk
index 7da9a4f71254..dd738106410f 100644
--- a/external/libxslt/UnpackedTarball_xslt.mk
+++ b/external/libxslt/UnpackedTarball_xslt.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,xslt,\
        external/libxslt/libxslt-internal-symbols.patch \
        external/libxslt/libxslt-msvc.patch.2 \
        external/libxslt/libxslt-1.1.26-memdump.patch \

... etc. - the rest is truncated
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to