summaryrefslogtreecommitdiff
path: root/dev-libs/libxslt/files/libxslt-1.1.41-extensions-xmlCheckFilename-older-libxml2.patch
blob: bdf39460af2af23a9d38cbda97195bbf01cd248c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
https://gitlab.gnome.org/GNOME/libxslt/-/commit/a85bd17ec52793b33074f0f785c3d989feb20170

From a85bd17ec52793b33074f0f785c3d989feb20170 Mon Sep 17 00:00:00 2001
From: Nick Wellnhofer <wellnhofer@aevum.de>
Date: Fri, 21 Jun 2024 15:07:18 +0200
Subject: [PATCH] extensions: Readd call to xmlCheckFilename with older libxml2

Fix spurious warning with libxml2 before 2.13.0 caused by 014b2892.

Fixes #113.
---
 libxslt/extensions.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/libxslt/extensions.c b/libxslt/extensions.c
index 05cdf354..d3d61543 100644
--- a/libxslt/extensions.c
+++ b/libxslt/extensions.c
@@ -415,6 +415,19 @@ xsltExtModuleRegisterDynamic(const xmlChar * URI)
                      module_filename, URI);
 #endif
 
+#if LIBXML_VERSION < 21300
+    if (1 != xmlCheckFilename(module_filename)) {
+
+#ifdef WITH_XSLT_DEBUG_EXTENSIONS
+	xsltGenericDebug(xsltGenericDebugContext,
+                     "xmlCheckFilename failed for plugin: %s\n", module_filename);
+#endif
+
+        xmlFree(ext_name);
+        return (-1);
+    }
+#endif
+
     /* attempt to open the module */
     m = xmlModuleOpen(module_filename, 0);
     if (NULL == m) {
-- 
GitLab