Accepting request 43619 from devel:libraries:c_c++

Copy from devel:libraries:c_c++/libxslt based on submit request 43619 from user puzel

OBS-URL: https://build.opensuse.org/request/show/43619
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libxslt?expand=0&rev=20
This commit is contained in:
OBS User autobuild 2010-07-23 15:02:36 +00:00 committed by Git OBS Bridge
parent 275d8918a9
commit b7d5600d6f
9 changed files with 38 additions and 185 deletions

View File

@ -1,13 +0,0 @@
Index: libxslt-1.1.24/libexslt/Makefile.am
===================================================================
--- libxslt-1.1.24.orig/libexslt/Makefile.am
+++ libxslt-1.1.24/libexslt/Makefile.am
@@ -11,8 +11,6 @@ exsltincdir = $(includedir)/libexslt
exsltinc_HEADERS = \
exslt.h \
exsltconfig.h \
- exslt.h \
- exsltconfig.h \
exsltexports.h
libexslt_la_SOURCES = \

View File

@ -1,11 +1,13 @@
--- python/Makefile.am
+++ python/Makefile.am
@@ -24,7 +24,7 @@
Index: python/Makefile.am
===================================================================
--- python/Makefile.am.orig 2009-05-12 08:29:34.000000000 +0200
+++ python/Makefile.am 2010-07-21 15:22:21.000000000 +0200
@@ -24,7 +24,7 @@ EXTRA_DIST = \
libxslt-python-api.xml \
$(DOCS)
-libxsltmod_la_LDFLAGS = -module -avoid-version
+libxsltmod_la_LDFLAGS = $(mylibs) -module -avoid-version
-libxsltmod_la_LDFLAGS = $(WIN32_EXTRA_LDFLAGS) -module -avoid-version
+libxsltmod_la_LDFLAGS = $(WIN32_EXTRA_LDFLAGS) $(mylibs) -module -avoid-version
if WITH_PYTHON
mylibs = \

View File

@ -1,152 +0,0 @@
Index: libexslt/crypto.c
===================================================================
--- libexslt/crypto.c (revision 1479)
+++ libexslt/crypto.c (working copy)
@@ -595,11 +595,13 @@ exsltCryptoRc4EncryptFunction (xmlXPathP
int str_len = 0, bin_len = 0, hex_len = 0;
xmlChar *key = NULL, *str = NULL, *padkey = NULL;
xmlChar *bin = NULL, *hex = NULL;
+ xsltTransformContextPtr tctxt = NULL;
- if ((nargs < 1) || (nargs > 3)) {
+ if (nargs != 2) {
xmlXPathSetArityError (ctxt);
return;
}
+ tctxt = xsltXPathGetTransformContext(ctxt);
str = xmlXPathPopString (ctxt);
str_len = xmlUTF8Strlen (str);
@@ -611,7 +613,7 @@ exsltCryptoRc4EncryptFunction (xmlXPathP
}
key = xmlXPathPopString (ctxt);
- key_len = xmlUTF8Strlen (str);
+ key_len = xmlUTF8Strlen (key);
if (key_len == 0) {
xmlXPathReturnEmptyString (ctxt);
@@ -620,15 +622,33 @@ exsltCryptoRc4EncryptFunction (xmlXPathP
return;
}
- padkey = xmlMallocAtomic (RC4_KEY_LENGTH);
+ padkey = xmlMallocAtomic (RC4_KEY_LENGTH + 1);
+ if (padkey == NULL) {
+ xsltTransformError(tctxt, NULL, tctxt->inst,
+ "exsltCryptoRc4EncryptFunction: Failed to allocate padkey\n");
+ tctxt->state = XSLT_STATE_STOPPED;
+ xmlXPathReturnEmptyString (ctxt);
+ goto done;
+ }
+ memset(padkey, 0, RC4_KEY_LENGTH + 1);
+
key_size = xmlUTF8Strsize (key, key_len);
+ if ((key_size > RC4_KEY_LENGTH) || (key_size < 0)) {
+ xsltTransformError(tctxt, NULL, tctxt->inst,
+ "exsltCryptoRc4EncryptFunction: key size too long or key broken\n");
+ tctxt->state = XSLT_STATE_STOPPED;
+ xmlXPathReturnEmptyString (ctxt);
+ goto done;
+ }
memcpy (padkey, key, key_size);
- memset (padkey + key_size, '\0', sizeof (padkey));
/* encrypt it */
bin_len = str_len;
bin = xmlStrdup (str);
if (bin == NULL) {
+ xsltTransformError(tctxt, NULL, tctxt->inst,
+ "exsltCryptoRc4EncryptFunction: Failed to allocate string\n");
+ tctxt->state = XSLT_STATE_STOPPED;
xmlXPathReturnEmptyString (ctxt);
goto done;
}
@@ -638,6 +658,9 @@ exsltCryptoRc4EncryptFunction (xmlXPathP
hex_len = str_len * 2 + 1;
hex = xmlMallocAtomic (hex_len);
if (hex == NULL) {
+ xsltTransformError(tctxt, NULL, tctxt->inst,
+ "exsltCryptoRc4EncryptFunction: Failed to allocate result\n");
+ tctxt->state = XSLT_STATE_STOPPED;
xmlXPathReturnEmptyString (ctxt);
goto done;
}
@@ -670,11 +693,13 @@ exsltCryptoRc4DecryptFunction (xmlXPathP
int str_len = 0, bin_len = 0, ret_len = 0;
xmlChar *key = NULL, *str = NULL, *padkey = NULL, *bin =
NULL, *ret = NULL;
+ xsltTransformContextPtr tctxt = NULL;
- if ((nargs < 1) || (nargs > 3)) {
+ if (nargs != 2) {
xmlXPathSetArityError (ctxt);
return;
}
+ tctxt = xsltXPathGetTransformContext(ctxt);
str = xmlXPathPopString (ctxt);
str_len = xmlUTF8Strlen (str);
@@ -686,7 +711,7 @@ exsltCryptoRc4DecryptFunction (xmlXPathP
}
key = xmlXPathPopString (ctxt);
- key_len = xmlUTF8Strlen (str);
+ key_len = xmlUTF8Strlen (key);
if (key_len == 0) {
xmlXPathReturnEmptyString (ctxt);
@@ -695,22 +720,51 @@ exsltCryptoRc4DecryptFunction (xmlXPathP
return;
}
- padkey = xmlMallocAtomic (RC4_KEY_LENGTH);
+ padkey = xmlMallocAtomic (RC4_KEY_LENGTH + 1);
+ if (padkey == NULL) {
+ xsltTransformError(tctxt, NULL, tctxt->inst,
+ "exsltCryptoRc4EncryptFunction: Failed to allocate padkey\n");
+ tctxt->state = XSLT_STATE_STOPPED;
+ xmlXPathReturnEmptyString (ctxt);
+ goto done;
+ }
+ memset(padkey, 0, RC4_KEY_LENGTH + 1);
key_size = xmlUTF8Strsize (key, key_len);
+ if ((key_size > RC4_KEY_LENGTH) || (key_size < 0)) {
+ xsltTransformError(tctxt, NULL, tctxt->inst,
+ "exsltCryptoRc4EncryptFunction: key size too long or key broken\n");
+ tctxt->state = XSLT_STATE_STOPPED;
+ xmlXPathReturnEmptyString (ctxt);
+ goto done;
+ }
memcpy (padkey, key, key_size);
- memset (padkey + key_size, '\0', sizeof (padkey));
/* decode hex to binary */
bin_len = str_len;
bin = xmlMallocAtomic (bin_len);
+ if (bin == NULL) {
+ xsltTransformError(tctxt, NULL, tctxt->inst,
+ "exsltCryptoRc4EncryptFunction: Failed to allocate string\n");
+ tctxt->state = XSLT_STATE_STOPPED;
+ xmlXPathReturnEmptyString (ctxt);
+ goto done;
+ }
ret_len = exsltCryptoHex2Bin (str, str_len, bin, bin_len);
/* decrypt the binary blob */
ret = xmlMallocAtomic (ret_len);
+ if (ret == NULL) {
+ xsltTransformError(tctxt, NULL, tctxt->inst,
+ "exsltCryptoRc4EncryptFunction: Failed to allocate result\n");
+ tctxt->state = XSLT_STATE_STOPPED;
+ xmlXPathReturnEmptyString (ctxt);
+ goto done;
+ }
PLATFORM_RC4_DECRYPT (ctxt, padkey, bin, ret_len, ret, ret_len);
xmlXPathReturnString (ctxt, ret);
+done:
if (key != NULL)
xmlFree (key);
if (str != NULL)

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d1c733326b7f0534f2c20ddd138be9589c9d6ec33123fcdbef66add728a6143b
size 2298254

3
libxslt-1.1.26.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bcf4aad227c3378f48e411a46c284b03afd15404a7d808a5faab938a2cc88952
size 2341453

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Jul 21 13:19:36 UTC 2010 - puzel@novell.com
- updated to 1.1.26
- no python related fixes in this libxslt release
-------------------------------------------------------------------
Fri Apr 11 14:39:52 CEST 2008 - prusnak@suse.cz

View File

@ -1,5 +1,5 @@
#
# spec file for package libxslt-python (Version 1.1.24)
# spec file for package libxslt-python (Version 1.1.26)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -21,14 +21,14 @@
Name: libxslt-python
BuildRequires: libxml2-python libxslt-devel python-devel
Summary: Python Bindings for libxslt
Version: 1.1.24
Release: 25
Version: 1.1.26
Release: 1
License: MIT License (or similar)
Group: Development/Libraries/Python
Source: libxslt-%{version}.tar.bz2
# Uncomment to save space:
#NoSource: 0
Patch0: libxslt-%{version}-linkflags.patch
Patch0: libxslt-1.1.24-linkflags.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{py_requires}
Requires: libxml2 >= 2.6.27

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Wed Jul 21 13:11:00 UTC 2010 - puzel@novell.com
- update to libxslt-1.1.26
- Improvements:
- Add xsltProcessOneNode to exported symbols for lxml
- Features:
- Add API versioning and various cleanups
- xsl:sort lang support using the locale
- Bug fixes
- Portability, documentation fixes
- drop libxslt-1.1.24-rc4-overflow.patch (included upstream)
- drop libxslt-1.1.24-am.patch (included upstream)
-------------------------------------------------------------------
Sat Apr 24 11:38:22 UTC 2010 - coolo@novell.com

View File

@ -1,5 +1,5 @@
#
# spec file for package libxslt (Version 1.1.24)
# spec file for package libxslt (Version 1.1.26)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -21,8 +21,8 @@
Name: libxslt
BuildRequires: libgcrypt libgcrypt-devel libgpg-error libgpg-error-devel libxml2-devel pkg-config
Summary: XSL Transformation Library
Version: 1.1.24
Release: 24
Version: 1.1.26
Release: 1
License: MIT License (or similar)
Group: System/Libraries
# bug437293
@ -32,9 +32,7 @@ Obsoletes: libxslt-64bit
#
Source: %{name}-%{version}.tar.bz2
Source2: baselibs.conf
Patch0: %{name}-%{version}-no-net-autobuild.patch
Patch1: %{name}-%{version}-rc4-overflow.patch
Patch2: %{name}-%{version}-am.patch
Patch0: %{name}-1.1.24-no-net-autobuild.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: libxml2 >= 2.6.27
Url: http://xmlsoft.org/XSLT/
@ -75,8 +73,6 @@ to develop applications that require these.
%prep
%setup -q
%patch0
%patch1
%patch2 -p1
%build
autoreconf --force --install