diff options
author | Jimi Huotari <chiitoo@gentoo.org> | 2018-07-29 16:53:34 +0300 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-08-13 19:45:52 +0000 |
commit | 922a17dfc0045e5ca565faf446c8ce09557e92cf (patch) | |
tree | 9379adccf9d34ab6ed1b16f463e9d2638b489419 | |
parent | 26d7e8597239035a2b57c73c92743dcdeffa9368 (diff) | |
download | qtwebengine-chromium-922a17dfc0045e5ca565faf446c8ce09557e92cf.tar.gz |
[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: I76ffc9f1efda0fa2db5aac9393e62c47c2f22318
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r-- | chromium/third_party/blink/renderer/core/xml/parser/xml_document_parser.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chromium/third_party/blink/renderer/core/xml/parser/xml_document_parser.cc b/chromium/third_party/blink/renderer/core/xml/parser/xml_document_parser.cc index e372b789d3d..a08d9ebdb27 100644 --- a/chromium/third_party/blink/renderer/core/xml/parser/xml_document_parser.cc +++ b/chromium/third_party/blink/renderer/core/xml/parser/xml_document_parser.cc @@ -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> @@ -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); |