diff options
author | Jimi Huotari <chiitoo@gentoo.org> | 2018-07-30 15:23:39 +0300 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-08-13 19:45:36 +0000 |
commit | eb5360b24e4574fb768ef5c685e7e043bcdfff41 (patch) | |
tree | b8aa8ad44e98b36cde5ac7d578bbe79d17cdd4a7 | |
parent | 2732726d14779777385da2afd5fc9d4c33166a74 (diff) |
[Backport] blink: disable XML catalogs at runtime
Chromium may optionally be built against libxml installed on the
system. The system libxml commonly has XML catalog support enabled.
Disable it by calling xmlCatalogSetDefaults(XML_CATA_ALLOW_NONE).
Bug: https://bugs.gentoo.org/653078
Reviewed-on: https://chromium-review.googlesource.com/1103710
Change-Id: I0a05de6b5bc46ace431960960ed43500054f29f1
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r-- | chromium/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chromium/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp b/chromium/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp index 34d6e09f1b9..6e67c12d16f 100644 --- a/chromium/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp +++ b/chromium/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp @@ -28,6 +28,10 @@ #include <libxml/parser.h> #include <libxml/parserInternals.h> +#include <libxml/xmlversion.h> +#if defined(LIBXML_CATALOG_ENABLED) +#include <libxml/catalog.h> +#endif #include <libxslt/xslt.h> #include <memory> #include "core/css/StyleEngine.h" @@ -646,6 +650,9 @@ static void InitializeLibXMLIfNecessary() { if (did_init) return; +#if defined(LIBXML_CATALOG_ENABLED) + xmlCatalogSetDefaults(XML_CATA_ALLOW_NONE); +#endif xmlInitParser(); xmlRegisterInputCallbacks(MatchFunc, OpenFunc, ReadFunc, CloseFunc); xmlRegisterOutputCallbacks(MatchFunc, OpenFunc, WriteFunc, CloseFunc); |