recipes: tde/tqt3: make QTDIR visible for the system
[dragora.git] / patches / libxslt / libxslt-1.1.33-security_fix-1.patch
blobd0cf73e73b37688367d335ed205ccc3b4253df5b
1 Submitted By: Douglas R. Reno <renodr at linuxfromscratch dot org>
2 Date: 2019-07-05
3 Initial Package Version: 1.1.33
4 Upstream Status: Applied
5 Origin: https://gitlab.gnome.org/GNOME/libxslt/commit/e03553605b45c88f0b4b2980adfbbb8f6fca2fd6
6 Description: Fixes CVE-2019-11068 in libxslt, a security framework
7 bypass.
9 diff -Naurp libxslt-1.1.33.orig/libxslt/documents.c libxslt-1.1.33/libxslt/documents.c
10 --- libxslt-1.1.33.orig/libxslt/documents.c 2015-05-10 09:11:29.000000000 -0500
11 +++ libxslt-1.1.33/libxslt/documents.c 2019-07-05 13:08:13.976670506 -0500
12 @@ -296,10 +296,11 @@ xsltLoadDocument(xsltTransformContextPtr
13 int res;
15 res = xsltCheckRead(ctxt->sec, ctxt, URI);
16 - if (res == 0) {
17 - xsltTransformError(ctxt, NULL, NULL,
18 - "xsltLoadDocument: read rights for %s denied\n",
19 - URI);
20 + if (res <= 0) {
21 + if (res == 0)
22 + xsltTransformError(ctxt, NULL, NULL,
23 + "xsltLoadDocument: read rights for %s denied\n",
24 + URI);
25 return(NULL);
28 @@ -372,10 +373,11 @@ xsltLoadStyleDocument(xsltStylesheetPtr
29 int res;
31 res = xsltCheckRead(sec, NULL, URI);
32 - if (res == 0) {
33 - xsltTransformError(NULL, NULL, NULL,
34 - "xsltLoadStyleDocument: read rights for %s denied\n",
35 - URI);
36 + if (res <= 0) {
37 + if (res == 0)
38 + xsltTransformError(NULL, NULL, NULL,
39 + "xsltLoadStyleDocument: read rights for %s denied\n",
40 + URI);
41 return(NULL);
44 diff -Naurp libxslt-1.1.33.orig/libxslt/imports.c libxslt-1.1.33/libxslt/imports.c
45 --- libxslt-1.1.33.orig/libxslt/imports.c 2017-12-02 02:58:51.000000000 -0600
46 +++ libxslt-1.1.33/libxslt/imports.c 2019-07-05 13:08:32.201199584 -0500
47 @@ -130,10 +130,11 @@ xsltParseStylesheetImport(xsltStylesheet
48 int secres;
50 secres = xsltCheckRead(sec, NULL, URI);
51 - if (secres == 0) {
52 - xsltTransformError(NULL, NULL, NULL,
53 - "xsl:import: read rights for %s denied\n",
54 - URI);
55 + if (secres <= 0) {
56 + if (secres == 0)
57 + xsltTransformError(NULL, NULL, NULL,
58 + "xsl:import: read rights for %s denied\n",
59 + URI);
60 goto error;
63 diff -Naurp libxslt-1.1.33.orig/libxslt/transform.c libxslt-1.1.33/libxslt/transform.c
64 --- libxslt-1.1.33.orig/libxslt/transform.c 2018-11-22 11:59:38.000000000 -0600
65 +++ libxslt-1.1.33/libxslt/transform.c 2019-07-05 13:09:00.994036330 -0500
66 @@ -3493,10 +3493,11 @@ xsltDocumentElem(xsltTransformContextPtr
68 if (ctxt->sec != NULL) {
69 ret = xsltCheckWrite(ctxt->sec, ctxt, filename);
70 - if (ret == 0) {
71 - xsltTransformError(ctxt, NULL, inst,
72 - "xsltDocumentElem: write rights for %s denied\n",
73 - filename);
74 + if (ret <= 0) {
75 + if (ret == 0)
76 + xsltTransformError(ctxt, NULL, inst,
77 + "xsltDocumentElem: write rights for %s denied\n",
78 + filename);
79 xmlFree(URL);
80 xmlFree(filename);
81 return;
82 diff -Naurp libxslt-1.1.33.orig/libxslt/xslt.c libxslt-1.1.33/libxslt/xslt.c
83 --- libxslt-1.1.33.orig/libxslt/xslt.c 2017-12-02 02:58:51.000000000 -0600
84 +++ libxslt-1.1.33/libxslt/xslt.c 2019-07-05 13:09:25.675754418 -0500
85 @@ -6763,10 +6763,11 @@ xsltParseStylesheetFile(const xmlChar* f
86 int res;
88 res = xsltCheckRead(sec, NULL, filename);
89 - if (res == 0) {
90 - xsltTransformError(NULL, NULL, NULL,
91 - "xsltParseStylesheetFile: read rights for %s denied\n",
92 - filename);
93 + if (res <= 0) {
94 + if (res == 0)
95 + xsltTransformError(NULL, NULL, NULL,
96 + "xsltParseStylesheetFile: read rights for %s denied\n",
97 + filename);
98 return(NULL);