From eb5360b24e4574fb768ef5c685e7e043bcdfff41 Mon Sep 17 00:00:00 2001 From: Jimi Huotari Date: Mon, 30 Jul 2018 15:23:39 +0300 Subject: [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 --- .../WebKit/Source/core/xml/parser/XMLDocumentParser.cpp | 7 +++++++ 1 file changed, 7 insertions(+) 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 #include +#include +#if defined(LIBXML_CATALOG_ENABLED) +#include +#endif #include #include #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); -- cgit v1.2.3