diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-09-23 11:29:49 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-09-23 11:29:49 +0100 |
commit | 55a7866dd6169a108d3a9e8d6696a970dea8a0b6 (patch) | |
tree | 4a43df088b5fd8cfde3ca236a3b1566f0f1b45af /net-proxy/squid/files | |
parent | 7f740fcb9a0165d81bfecf7fb5da647763d76a1b (diff) |
gentoo auto-resync : 23:09:2022 - 11:29:49
Diffstat (limited to 'net-proxy/squid/files')
-rw-r--r-- | net-proxy/squid/files/squid-4.17-fix-libxml2-2.10.0.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/net-proxy/squid/files/squid-4.17-fix-libxml2-2.10.0.patch b/net-proxy/squid/files/squid-4.17-fix-libxml2-2.10.0.patch new file mode 100644 index 000000000000..ebc0cd698e14 --- /dev/null +++ b/net-proxy/squid/files/squid-4.17-fix-libxml2-2.10.0.patch @@ -0,0 +1,30 @@ +https://bugs.gentoo.org/866518 +https://github.com/squid-cache/squid/commit/c4e6b7c2a12fa218089fe839f769ffc8ae18dea4 + +From c4e6b7c2a12fa218089fe839f769ffc8ae18dea4 Mon Sep 17 00:00:00 2001 +From: Nick Wellnhofer <wellnhofer@aevum.de> +Date: Sun, 20 Feb 2022 19:42:40 +0000 +Subject: [PATCH] ESI: Drop incorrect and unnecessary xmlSetFeature() call + (#988) + +xmlSetFeature() has been deprecated for 10+ years and will eventually be +removed from libxml2. Squid calls xmlSetFeature() with the wrong +argument: a nil `value` pointer instead of a pointer to a zero value. +When called with a nil `value`, the function does nothing but returning +an error. Squid does not check whether xmlSetFeature() call is +successful, and the bug went unnoticed since libxml2 support was added +in commit 964b44c. + +Since libxml2 does not substitute entities by default, the call can be +removed to achieve the intended effect. +--- a/src/esi/Libxml2Parser.cc ++++ b/src/esi/Libxml2Parser.cc +@@ -118,7 +118,6 @@ ESILibxml2Parser::ESILibxml2Parser(ESIParserClient *aClient) : theClient (aClien + + /* TODO: grab the document encoding from the headers */ + parser = xmlCreatePushParserCtxt(&sax, static_cast<void *>(this), NULL, 0, NULL); +- xmlSetFeature(parser, "substitute entities", 0); + + if (entity_doc == NULL) + entity_doc = htmlNewDoc(NULL, NULL); + |