summaryrefslogtreecommitdiff
path: root/source/l/libxml2
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2016-06-30 20:26:57 +0000
committerEric Hameleers <alien@slackware.com>2018-05-31 23:31:18 +0200
commitd31c50870d0bee042ce660e445c9294a59a3a65b (patch)
tree6bfc0de3c95267b401b620c2c67859557dc60f97 /source/l/libxml2
parent76fc4757ac91ac7947a01fb7b53dddf9a78a01d1 (diff)
downloadcurrent-d31c50870d0bee042ce660e445c9294a59a3a65b.tar.gz
Slackware 14.2slackware-14.2
Thu Jun 30 20:26:57 UTC 2016 Slackware 14.2 x86_64 stable is released! The long development cycle (the Linux community has lately been living in "interesting times", as they say) is finally behind us, and we're proud to announce the release of Slackware 14.2. The new release brings many updates and modern tools, has switched from udev to eudev (no systemd), and adds well over a hundred new packages to the system. Thanks to the team, the upstream developers, the dedicated Slackware community, and everyone else who pitched in to help make this release a reality. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. Have fun! :-)
Diffstat (limited to 'source/l/libxml2')
-rw-r--r--source/l/libxml2/0001-Fix-attribute-decoding-during-XML-schema-validation.diff67
-rwxr-xr-xsource/l/libxml2/libxml2.SlackBuild13
2 files changed, 75 insertions, 5 deletions
diff --git a/source/l/libxml2/0001-Fix-attribute-decoding-during-XML-schema-validation.diff b/source/l/libxml2/0001-Fix-attribute-decoding-during-XML-schema-validation.diff
new file mode 100644
index 00000000..6dbaddcd
--- /dev/null
+++ b/source/l/libxml2/0001-Fix-attribute-decoding-during-XML-schema-validation.diff
@@ -0,0 +1,67 @@
+From 256366ed60f8795279b25f7b7b55e8089b4c6ff4 Mon Sep 17 00:00:00 2001
+From: Alex Henrie <alexhenrie24@gmail.com>
+Date: Thu, 26 May 2016 17:38:35 -0600
+Subject: [PATCH] Fix attribute decoding during XML schema validation
+
+For https://bugzilla.gnome.org/show_bug.cgi?id=766834
+
+vctxt->parserCtxt is always NULL in xmlSchemaSAXHandleStartElementNs,
+so this function can't call xmlStringLenDecodeEntities to decode the
+entities.
+---
+ xmlschemas.c | 30 +++++++++++++++++++++++++-----
+ 1 file changed, 25 insertions(+), 5 deletions(-)
+
+diff --git a/xmlschemas.c b/xmlschemas.c
+index e1b3a4f..59535e5 100644
+--- a/xmlschemas.c
++++ b/xmlschemas.c
+@@ -27391,6 +27391,7 @@ xmlSchemaSAXHandleStartElementNs(void *ctx,
+ * attributes yet.
+ */
+ if (nb_attributes != 0) {
++ int valueLen, k, l;
+ xmlChar *value;
+
+ for (j = 0, i = 0; i < nb_attributes; i++, j += 5) {
+@@ -27400,12 +27401,31 @@ xmlSchemaSAXHandleStartElementNs(void *ctx,
+ * libxml2 differs from normal SAX here in that it escapes all ampersands
+ * as &#38; instead of delivering the raw converted string. Changing the
+ * behavior at this point would break applications that use this API, so
+- * we are forced to work around it. There is no danger of accidentally
+- * decoding some entity other than &#38; in this step because without
+- * unescaped ampersands there can be no other entities in the string.
++ * we are forced to work around it.
+ */
+- value = xmlStringLenDecodeEntities(vctxt->parserCtxt, attributes[j+3],
+- attributes[j+4] - attributes[j+3], XML_SUBSTITUTE_REF, 0, 0, 0);
++ valueLen = attributes[j+4] - attributes[j+3];
++ value = xmlMallocAtomic(valueLen + 1);
++ if (value == NULL) {
++ xmlSchemaVErrMemory(vctxt,
++ "allocating string for decoded attribute",
++ NULL);
++ goto internal_error;
++ }
++ for (k = 0, l = 0; k < valueLen; l++) {
++ if (k < valueLen - 4 &&
++ attributes[j+3][k+0] == '&' &&
++ attributes[j+3][k+1] == '#' &&
++ attributes[j+3][k+2] == '3' &&
++ attributes[j+3][k+3] == '8' &&
++ attributes[j+3][k+4] == ';') {
++ value[l] = '&';
++ k += 5;
++ } else {
++ value[l] = attributes[j+3][k];
++ k++;
++ }
++ }
++ value[l] = '\0';
+ /*
+ * TODO: Set the node line.
+ */
+--
+2.8.3
+
+
diff --git a/source/l/libxml2/libxml2.SlackBuild b/source/l/libxml2/libxml2.SlackBuild
index 1f44142c..87280fca 100755
--- a/source/l/libxml2/libxml2.SlackBuild
+++ b/source/l/libxml2/libxml2.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010, 2011, 2012, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,12 +23,12 @@
PKGNAM=libxml2
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -37,8 +37,8 @@ fi
NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
@@ -70,11 +70,14 @@ find . \
zcat $CWD/libxml2.do-not-check-crc.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/0001-Fix-attribute-decoding-during-XML-schema-validation.diff.gz | patch -p1 --verbose || exit 1
+
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--mandir=/usr/man \
+ --disable-static \
--build=$ARCH-slackware-linux
make $NUMJOBS || make || exit 1