!14 【master分支】sync patches from LTS branch

From: @yang_zhuang_zhuang
Reviewed-by: @xiezhipeng1
Signed-off-by: @xiezhipeng1
This commit is contained in:
openeuler-ci-bot 2020-10-12 17:11:57 +08:00 committed by Gitee
commit 3b22f45aba
5 changed files with 140 additions and 2 deletions

View File

@ -0,0 +1,28 @@
From 291d190b3d37bfe58efe7328e37a5334c553126b Mon Sep 17 00:00:00 2001
From: David Kilzer <ddkilzer@apple.com>
Date: Tue, 7 Jan 2020 15:15:53 -0800
Subject: [PATCH 10/24] Fix clang -Wconditional-uninitialized warning in
libxslt/numbers.c
* libxslt/numbers.c:
(xsltFormatNumberConversion): Initialize `len` to fix warning.
---
libxslt/numbers.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libxslt/numbers.c b/libxslt/numbers.c
index 92023f8..7969dc9 100644
--- a/libxslt/numbers.c
+++ b/libxslt/numbers.c
@@ -960,7 +960,7 @@ xsltFormatNumberConversion(xsltDecimalFormatPtr self,
xmlChar *nprefix, *nsuffix = NULL;
int prefix_length, suffix_length = 0, nprefix_length, nsuffix_length;
double scale;
- int j, len;
+ int j, len = 0;
int self_grouping_len;
xsltFormatNumberInfo format_info;
/*
--
1.8.3.1

View File

@ -0,0 +1,28 @@
From aac4bccdd893713dd058305e385d7f13f94e6add Mon Sep 17 00:00:00 2001
From: David Kilzer <ddkilzer@apple.com>
Date: Tue, 7 Jan 2020 15:23:17 -0800
Subject: [PATCH 11/24] Fix clang -Wimplicit-int-conversion warning
* libxslt/numbers.c:
(xsltNumberFormatDecimal): Cast `val` to `(xmlChar)` to fix the
warning.
---
libxslt/numbers.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libxslt/numbers.c b/libxslt/numbers.c
index 7969dc9..4cb2125 100644
--- a/libxslt/numbers.c
+++ b/libxslt/numbers.c
@@ -177,7 +177,7 @@ xsltNumberFormatDecimal(xmlBufferPtr buffer,
i = -1;
break;
}
- *(--pointer) = val;
+ *(--pointer) = (xmlChar)val;
}
else {
/*
--
1.8.3.1

View File

@ -0,0 +1,25 @@
From f235404b13f17d5343b854fe5d459a0c98bbd2d2 Mon Sep 17 00:00:00 2001
From: Nick Wellnhofer <wellnhofer@aevum.de>
Date: Fri, 10 Jan 2020 13:11:45 +0100
Subject: [PATCH 12/24] Fix implicit-int-conversion warning in exslt/crypto.c
---
libexslt/crypto.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libexslt/crypto.c b/libexslt/crypto.c
index 621fd90..c6bf34f 100644
--- a/libexslt/crypto.c
+++ b/libexslt/crypto.c
@@ -101,7 +101,7 @@ exsltCryptoHex2Bin (const unsigned char *hex, int hexlen,
else if (tmp >= 'a' && tmp <= 'f')
lo = 10 + (tmp - 'a');
- result = hi << 4;
+ result = (unsigned char) (hi << 4);
result += lo;
bin[j++] = result;
}
--
1.8.3.1

View File

@ -0,0 +1,50 @@
From b90e1063a83d9c0328d2559cdb6e9455da9747c7 Mon Sep 17 00:00:00 2001
From: Nick Wellnhofer <wellnhofer@aevum.de>
Date: Fri, 10 Jan 2020 12:58:35 +0100
Subject: [PATCH 08/24] Fix variable syntax in Python configuration
Resolves #30.
---
configure.ac | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/configure.ac b/configure.ac
index 585b9d7..d676b12 100644
--- a/configure.ac
+++ b/configure.ac
@@ -272,17 +272,17 @@ except: print 0"`
-d $with_python/lib/python$PYTHON_VERSION/site-packages
then
PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION
- PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages'
+ PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
else
if test -r $prefix/include/python$PYTHON_VERSION/Python.h
then
PYTHON_INCLUDES=$prefix/include/python$PYTHON_VERSION
- PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages'
+ PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
else
if test -r /usr/include/python$PYTHON_VERSION/Python.h
then
PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION
- PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages'
+ PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
else
echo could not find python$PYTHON_VERSION/Python.h
fi
@@ -296,9 +296,9 @@ except: print 0"`
fi
if test "$with_python" != ""
then
- pythondir='$(PYTHON_SITE_PACKAGES)'
+ pythondir=$PYTHON_SITE_PACKAGES
else
- pythondir='$(libdir)/python$(PYTHON_VERSION)/site-packages'
+ pythondir=$libdir/python$PYTHON_VERSION/site-packages
fi
fi
AM_CONDITIONAL(WITH_PYTHON, test "$PYTHON_INCLUDES" != "")
--
1.8.3.1

View File

@ -1,13 +1,17 @@
Name: libxslt
Version: 1.1.34
Release: 2
Release: 3
Summary: XSLT Transformation Library
License: MIT
URL: http://xmlsoft.org/libxslt/
Source0: https://github.com/GNOME/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM bug-fix https://github.com/GNOME/libxslt/
Patch0: CVE-2015-9019.patch
Patch1: Fix-quadratic-runtime-with-text-and-xsl-message.patch
Patch1: Fix-variable-syntax-in-Python-configuration.patch
Patch2: Fix-clang-Wconditional-uninitialized-warning-in-libx.patch
Patch3: Fix-clang-Wimplicit-int-conversion-warning.patch
Patch4: Fix-implicit-int-conversion-warning-in-exslt-crypto..patch
Patch5: Fix-quadratic-runtime-with-text-and-xsl-message.patch
BuildRequires: gcc make libtool autoconf automake libgcrypt-devel pkgconfig(libxml-2.0) >= 2.6.27
@ -97,6 +101,9 @@ make check
%doc python/tests/*.xsl
%changelog
* Wed Sep 23 2020 yangzhuangzhuang<yangzhuangzhuang1@huawei.com> - 1.1.34-3
- sync patches from LTS branch
* Wed Sep 23 2020 yangzhuangzhuang<yangzhuangzhuang1@huawei.com> - 1.1.34-2
- Fix the large loop found in xsltApplyStylesheetUser through fuzzing testcase xslt.