diff options
author | wiz <wiz@pkgsrc.org> | 2012-06-03 22:18:33 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2012-06-03 22:18:33 +0000 |
commit | ca30597041a181fa810fecddd3c9332a22787639 (patch) | |
tree | 7e9f1749307d4c395a35f4f0871729b6c22bfba9 /textproc | |
parent | 3d10d4dca1bebaa1fdeee59e06aac20f4bcfe024 (diff) | |
download | pkgsrc-ca30597041a181fa810fecddd3c9332a22787639.tar.gz |
Update to 2.8.0:
2.8.0: May 23 2012
Features: - add lzma compression support (Anders F Bjorklund)
Documentation: xmlcatalog: Add uri and delegateURI to possible
add types in man page. (Ville Skyttä), Update README.tests
(Daniel Veillard), URI handling code is not OOM resilient
(Daniel Veillard), Fix an error in comment (Daniel Veillard),
Fixed bug #617016 (Daniel Mustieles), Fixed two typos in the
README document (Daniel Neel), add generated html files (Anders
F Bjorklund), Clarify the need to use xmlFreeNode after
xmlUnlinkNode (Daniel Veillard), Improve documentation a bit
(Daniel Veillard), Updated URL for lxml python bindings (Daniel
Veillard)
Portability: Restore code for Windows compilation (Daniel
Veillard), Remove git error message during configure (Christian
Dywan), xmllint: Build fix for endTimer if !defined(HAVE_GETTIMEOFDAY)
(Patrick R. Gansterer), remove a bashism in confgure.in (John
Hein), undef ERROR if already defined (Patrick R. Gansterer),
Fix library problems with mingw-w64 (Michael Cronenworth), fix
windows build. ifdef addition from bug 666491 makes no sense
(Rob Richards), prefer native threads on win32 (Sam Thursfield),
Allow to compile with Visual Studio 2010 (Thomas Lemm), Fix
mingw's snprintf configure check (Andoni Morales), fixed a
64bit big endian issue (Marcus Meissner), Fix portability
failure if netdb.h lacks NO_ADDRESS (Daniel Veillard), Fix
windows build from lzma addition (Rob Richards), autogen: Only
check for libtoolize (Colin Walters), Fix the Windows build
files (Patrick von Reth), 634846 Remove a linking option breaking
Windows VC10 (Daniel Veillard), 599241 fix an initialization
problem on Win64 (Andrew W. Nosenko), fix win build (Rob
Richards)
Bug fixes: Part for rand_r checking missing (Daniel Veillard),
Cleanup on randomization (Daniel Veillard), Fix undefined
reference in python module (Pacho Ramos), Fix a race in
xmlNewInputStream (Daniel Veillard), Fix weird streaming RelaxNG
errors (Noam), Fix various bugs in new code raised by the API
checking (Daniel Veillard), Fix various problems with "make
dist" (Daniel Veillard), Fix a memory leak in the xzlib code
(Daniel Veillard), HTML parser error with <noscript> in the
<head> (Denis Pauk), XSD: optional element in complex type
extension (Remi Gacogne), Fix html serialization error and
htmlSetMetaEncoding() (Daniel Veillard), Fix a wrong return
value in previous patch (Daniel Veillard), Fix an uninitialized
variable use (Daniel Veillard), Fix a compilation problem with
--minimum (Brandon Slack), Remove redundant and ungarded include
of resolv.h (Daniel Veillard), xinclude with parse="text" does
not use the entity loader (Shaun McCance), Allow to parse 1
byte HTML files (Denis Pauk), Patch that fixes the skipping of
the HTML_PARSE_NOIMPLIED flag (Martin Schröder), Avoid memory
leak if xmlParserInputBufferCreateIO fails (Lin Yi-Li), Prevent
an infinite loop when dumping a node with encoding problems
(Timothy Elliott), xmlParseNodeInContext problems with an empty
document (Tim Elliott), HTML element position is not detected
propperly (Pavel Andrejs), Fix an off by one pointer access
(Jüri Aedla), Try to fix a problem with entities in SAX mode
(Daniel Veillard), Fix a crash with xmllint --path on empty
results (Daniel Veillard), Fixed bug #667946 (Daniel Mustieles),
Fix a logic error in Schemas Component Constraints (Ryan Sleevi),
Fix a wrong enum type use in Schemas Types (Nico Weber), Fix
SAX2 builder in case of undefined attributes namespace (Daniel
Veillard), Fix SAX2 builder in case of undefined element
namespaces (Daniel Veillard), fix reference to STDOUT_FILENO
on MSVC (Tay Ray Chuan), fix a pair of possible out of array
char references (Daniel Veillard), Fix an allocation error when
copying entities (Daniel Veillard), Make sure the parser returns
when getting a Stop order (Chris Evans), Fix some potential
problems on reallocation failures(parser.c) (Xia Xinfeng), Fix
a schema type duration comparison overflow (Daniel Veillard),
Fix an unimplemented part in RNG value validation (Daniel
Veillard), Fix missing error status in XPath evaluation (Daniel
Veillard), Hardening of XPath evaluation (Daniel Veillard),
Fix an off by one error in encoding (Daniel Veillard), Fix
RELAX NG include bug #655288 (Shaun McCance), Fix XSD validation
bug #630130 (Toyoda Eizi), Fix some potential problems on
reallocation failures (Chris Evans), __xmlRaiseError: fix use
of the structured callback channel (Dmitry V. Levin),
__xmlRaiseError: fix the structured callback channel's data
initialization (Dmitry V. Levin), Fix memory corruption when
xmlParseBalancedChunkMemoryInternal is called from
xmlParseBalancedChunk (Rob Richards), Small fix for previous
commit (Daniel Veillard), Fix a potential freeing error in
XPath (Daniel Veillard), Fix a potential memory access error
(Daniel Veillard), Reactivate the shared library versionning
script (Daniel Veillard)
Improvements: use mingw C99 compatible functions {v}snprintf
instead those from MSVC runtime (Roumen Petrov), New symbols
added for the next release (Daniel Veillard), xmlTextReader
bails too quickly on error (Andy Lutomirski), Use a hybrid
allocation scheme in xmlNodeSetContent (Conrad Irwin), Use
buffers when constructing string node lists. (Conrad Irwin),
Add HTML parser support for HTML5 meta charset encoding
declaration (Denis Pauk), wrong message for double hyp"whereis"
command to xmllint shell (Ryan), Improve xmllint shell (Ryan),
add function xmlTextReaderRelaxNGValidateCtxt() (Noam Postavsky),
Add --system support to autogen.sh (Daniel Veillard), Add hash
randomization to hash and dict structures (Daniel Veillard),
included xzlib in dist (Anders F Bjorklund), move xz/lzma
helpers to separate included files (Anders F Bjorklund), add
generated devhelp files (Anders F Bjorklund), add XML_WITH_LZMA
to api (Anders F Bjorklund), autogen.sh: Honor NOCONFIGURE
environment variable (Colin Walters), Improve the error report
on undefined REFs (Daniel Veillard), Add exception for new W3C
PI xml-model (Daniel Veillard), Add options to ignore the
internal encoding (Daniel Veillard), testapi: use the right
type for the check (Stefan Kost), various: handle return values
of write calls (Stefan Kost), testWriter:
xmlTextWriterWriteFormatElement wants an int instead of a long
int (Stefan Kost), runxmlconf: update to latest testsuite
version (Stefan Kost), configure: add -Wno-long-long to CFLAGS
(Stefan Kost), configure: support silent automake rules if
possible (Stefan Kost), xmlmemory: add a cast as size_t has no
portable printf modifier (Stefan Kost), __xmlRaiseError: remove
redundant schannel initialization (Dmitry V. Levin), __xmlRaiseError:
do cheap code check early (Dmitry V. Levin)
Cleanups: Cleanups before 2.8.0-rc2 (Daniel Veillard), Avoid
an extra operation (Daniel Veillard), Remove vestigial
de-ANSI-fication support. (Javier Jardón), autogen.sh: Fix
typo (Javier Jardón), Do not use unsigned but unsigned int
(Daniel Veillard), Remove two references to u_short (Daniel
Veillard), Fix -Wempty-body warning from clang (Nico Weber),
Cleanups of lzma support (Daniel Veillard), Augment the list
of ignored files (Daniel Veillard), python: remove unused
variable (Stefan Kost), python: flag two unused args (Stefan
Kost), configure: acconfig.h is deprecated since autoconf-2.50
(Stefan Kost), xpath: remove unused variable (Stefan Kost)
Diffstat (limited to 'textproc')
-rw-r--r-- | textproc/libxml2/Makefile | 5 | ||||
-rw-r--r-- | textproc/libxml2/PLIST | 3 | ||||
-rw-r--r-- | textproc/libxml2/distinfo | 21 | ||||
-rw-r--r-- | textproc/libxml2/patches/patch-CVE-2012-0841-aa | 176 | ||||
-rw-r--r-- | textproc/libxml2/patches/patch-CVE-2012-0841-ab | 93 | ||||
-rw-r--r-- | textproc/libxml2/patches/patch-CVE-2012-0841-ac | 15 | ||||
-rw-r--r-- | textproc/libxml2/patches/patch-ab | 51 | ||||
-rw-r--r-- | textproc/libxml2/patches/patch-ag | 24 | ||||
-rw-r--r-- | textproc/libxml2/patches/patch-aj | 14 | ||||
-rw-r--r-- | textproc/libxml2/patches/patch-ak | 350 | ||||
-rw-r--r-- | textproc/libxml2/patches/patch-al | 93 | ||||
-rw-r--r-- | textproc/libxml2/patches/patch-include_libxml_xpath.h | 23 | ||||
-rw-r--r-- | textproc/libxml2/patches/patch-xpointer.c | 41 |
13 files changed, 43 insertions, 866 deletions
diff --git a/textproc/libxml2/Makefile b/textproc/libxml2/Makefile index 126d22e2ca5..bd0197f2e91 100644 --- a/textproc/libxml2/Makefile +++ b/textproc/libxml2/Makefile @@ -1,7 +1,6 @@ -# $NetBSD: Makefile,v 1.116 2012/05/21 12:22:53 taca Exp $ +# $NetBSD: Makefile,v 1.117 2012/06/03 22:18:33 wiz Exp $ -DISTNAME= libxml2-2.7.8 -PKGREVISION= 10 +DISTNAME= libxml2-2.8.0 CATEGORIES= textproc MASTER_SITES= ftp://xmlsoft.org/libxml2/ \ http://xmlsoft.org/sources/ diff --git a/textproc/libxml2/PLIST b/textproc/libxml2/PLIST index a8351e1ef52..2d48b6cb007 100644 --- a/textproc/libxml2/PLIST +++ b/textproc/libxml2/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.41 2009/06/14 18:17:21 joerg Exp $ +@comment $NetBSD: PLIST,v 1.42 2012/06/03 22:18:33 wiz Exp $ bin/xml2-config bin/xmlcatalog bin/xmllint @@ -117,6 +117,7 @@ share/doc/libxml2/html/libxml-xmlwriter.html share/doc/libxml2/html/libxml-xpath.html share/doc/libxml2/html/libxml-xpathInternals.html share/doc/libxml2/html/libxml-xpointer.html +share/doc/libxml2/html/libxml-xzlib.html share/doc/libxml2/html/right.png share/doc/libxml2/html/up.png share/doc/libxml2/io1.c diff --git a/textproc/libxml2/distinfo b/textproc/libxml2/distinfo index 94af4278f88..d039617c2a4 100644 --- a/textproc/libxml2/distinfo +++ b/textproc/libxml2/distinfo @@ -1,22 +1,15 @@ -$NetBSD: distinfo,v 1.92 2012/05/21 12:22:53 taca Exp $ +$NetBSD: distinfo,v 1.93 2012/06/03 22:18:33 wiz Exp $ -SHA1 (libxml2-2.7.8.tar.gz) = 859dd535edbb851cc15b64740ee06551a7a17d40 -RMD160 (libxml2-2.7.8.tar.gz) = 30709622cfe3e2175e73d6701b7e19a25ab5ac47 -Size (libxml2-2.7.8.tar.gz) = 4881808 bytes -SHA1 (patch-CVE-2012-0841-aa) = b5fcb53c69ab808aafbaa81e9a4bef3f69057ff8 -SHA1 (patch-CVE-2012-0841-ab) = 2fd0d1a610bc517c4062f5ba30ec546d153eb5a1 -SHA1 (patch-CVE-2012-0841-ac) = 3ee79a6ecaf498ae0db4f64a10e22cc3e515e1e3 +SHA1 (libxml2-2.8.0.tar.gz) = a0c553bd51ba79ab6fff26dc700004c6a41f5250 +RMD160 (libxml2-2.8.0.tar.gz) = 45820c9f4939f642a87be9259c55fd081ea6759a +Size (libxml2-2.8.0.tar.gz) = 4915203 bytes SHA1 (patch-aa) = 9e19e9218d2e209bf49e9491842c8097005eba65 -SHA1 (patch-ab) = 375946d5aaedd9594b41336941440d5071c392dc +SHA1 (patch-ab) = df6ced03469ca56bc9e1e4227557163c94cfb014 SHA1 (patch-ac) = 264c75cf9fff5319105b971c122cdf5fc103c04e SHA1 (patch-ad) = cd45da492b02cce9983c46762839f68b8b1e0177 SHA1 (patch-ae) = b8d8e0275cab3caafd98275ac22b63951fc4b5fd -SHA1 (patch-ag) = ab4aeeb8ca696b88285274760ab3ef08800773a0 -SHA1 (patch-aj) = 24eb4a08ea4c40be6d75a72cd0bb5280514f73d4 -SHA1 (patch-ak) = 5e0e9807d7ae0bc93a5583a61bb88a49ec1751e8 -SHA1 (patch-al) = 45f984fef5cf5d04c46e940867707897396a9c9f +SHA1 (patch-ag) = 30ec5c8daece4aba75a02bbc13db5373542dea7b +SHA1 (patch-aj) = faa126261b388aeed3a83c4d9c0b127629dd93ab SHA1 (patch-am) = ae7ab69b7bba2271d2d996161cc8b9956d0b06fa -SHA1 (patch-include_libxml_xpath.h) = 3fc74551a7843668cf9ffee19b1f20ccb674e153 SHA1 (patch-testapi.c) = 63a0a34c8ca98d9214c4d3391e97d9a9ca4569f8 SHA1 (patch-threads.c) = 38bf7d702c21057795eec88d4e239b5df598382d -SHA1 (patch-xpointer.c) = 720ed5e012759cee6551b71c352ba31e19d39406 diff --git a/textproc/libxml2/patches/patch-CVE-2012-0841-aa b/textproc/libxml2/patches/patch-CVE-2012-0841-aa deleted file mode 100644 index ec77331faac..00000000000 --- a/textproc/libxml2/patches/patch-CVE-2012-0841-aa +++ /dev/null @@ -1,176 +0,0 @@ -$NetBSD: patch-CVE-2012-0841-aa,v 1.1 2012/03/09 12:12:28 drochner Exp $ - -patch 8973d58b7498fa5100a876815476b81fd1a2412a - ---- dict.c.orig 2010-10-12 06:25:31.000000000 +0000 -+++ dict.c -@@ -2,7 +2,7 @@ - * dict.c: dictionary of reusable strings, just used to avoid allocation - * and freeing operations. - * -- * Copyright (C) 2003 Daniel Veillard. -+ * Copyright (C) 2003-2012 Daniel Veillard. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above -@@ -19,6 +19,28 @@ - #define IN_LIBXML - #include "libxml.h" - -+#ifdef HAVE_STDLIB_H -+#include <stdlib.h> -+#endif -+#ifdef HAVE_TIME_H -+#include <time.h> -+#endif -+ -+/* -+ * Following http://www.ocert.org/advisories/ocert-2011-003.html -+ * it seems that having hash randomization might be a good idea -+ * when using XML with untrusted data -+ * Note1: that it works correctly only if compiled with WITH_BIG_KEY -+ * which is the default. -+ * Note2: the fast function used for a small dict won't protect very -+ * well but since the attack is based on growing a very big hash -+ * list we will use the BigKey algo as soon as the hash size grows -+ * over MIN_DICT_SIZE so this actually works -+ */ -+#if defined(HAVE_RAND) && defined(HAVE_SRAND) && defined(HAVE_TIME) -+#define DICT_RANDOMIZATION -+#endif -+ - #include <string.h> - #ifdef HAVE_STDINT_H - #include <stdint.h> -@@ -44,23 +66,23 @@ typedef unsigned __int32 uint32_t; - #define WITH_BIG_KEY - - #ifdef WITH_BIG_KEY --#define xmlDictComputeKey(dict, name, len) \ -- (((dict)->size == MIN_DICT_SIZE) ? \ -- xmlDictComputeFastKey(name, len) : \ -- xmlDictComputeBigKey(name, len)) -- --#define xmlDictComputeQKey(dict, prefix, plen, name, len) \ -- (((prefix) == NULL) ? \ -- (xmlDictComputeKey(dict, name, len)) : \ -- (((dict)->size == MIN_DICT_SIZE) ? \ -- xmlDictComputeFastQKey(prefix, plen, name, len) : \ -- xmlDictComputeBigQKey(prefix, plen, name, len))) -+#define xmlDictComputeKey(dict, name, len) \ -+ (((dict)->size == MIN_DICT_SIZE) ? \ -+ xmlDictComputeFastKey(name, len, (dict)->seed) : \ -+ xmlDictComputeBigKey(name, len, (dict)->seed)) -+ -+#define xmlDictComputeQKey(dict, prefix, plen, name, len) \ -+ (((prefix) == NULL) ? \ -+ (xmlDictComputeKey(dict, name, len)) : \ -+ (((dict)->size == MIN_DICT_SIZE) ? \ -+ xmlDictComputeFastQKey(prefix, plen, name, len, (dict)->seed) : \ -+ xmlDictComputeBigQKey(prefix, plen, name, len, (dict)->seed))) - - #else /* !WITH_BIG_KEY */ --#define xmlDictComputeKey(dict, name, len) \ -- xmlDictComputeFastKey(name, len) --#define xmlDictComputeQKey(dict, prefix, plen, name, len) \ -- xmlDictComputeFastQKey(prefix, plen, name, len) -+#define xmlDictComputeKey(dict, name, len) \ -+ xmlDictComputeFastKey(name, len, (dict)->seed) -+#define xmlDictComputeQKey(dict, prefix, plen, name, len) \ -+ xmlDictComputeFastQKey(prefix, plen, name, len, (dict)->seed) - #endif /* WITH_BIG_KEY */ - - /* -@@ -98,6 +120,8 @@ struct _xmlDict { - xmlDictStringsPtr strings; - - struct _xmlDict *subdict; -+ /* used for randomization */ -+ int seed; - }; - - /* -@@ -125,6 +149,9 @@ static int xmlInitializeDict(void) { - if ((xmlDictMutex = xmlNewRMutex()) == NULL) - return(0); - -+#ifdef DICT_RANDOMIZATION -+ srand(time(NULL)); -+#endif - xmlDictInitialized = 1; - return(1); - } -@@ -277,13 +304,13 @@ found_pool: - */ - - static uint32_t --xmlDictComputeBigKey(const xmlChar* data, int namelen) { -+xmlDictComputeBigKey(const xmlChar* data, int namelen, int seed) { - uint32_t hash; - int i; - - if (namelen <= 0 || data == NULL) return(0); - -- hash = 0; -+ hash = seed; - - for (i = 0;i < namelen; i++) { - hash += data[i]; -@@ -310,12 +337,12 @@ xmlDictComputeBigKey(const xmlChar* data - */ - static unsigned long - xmlDictComputeBigQKey(const xmlChar *prefix, int plen, -- const xmlChar *name, int len) -+ const xmlChar *name, int len, int seed) - { - uint32_t hash; - int i; - -- hash = 0; -+ hash = seed; - - for (i = 0;i < plen; i++) { - hash += prefix[i]; -@@ -346,8 +373,8 @@ xmlDictComputeBigQKey(const xmlChar *pre - * for low hash table fill. - */ - static unsigned long --xmlDictComputeFastKey(const xmlChar *name, int namelen) { -- unsigned long value = 0L; -+xmlDictComputeFastKey(const xmlChar *name, int namelen, int seed) { -+ unsigned long value = seed; - - if (name == NULL) return(0); - value = *name; -@@ -381,9 +408,9 @@ xmlDictComputeFastKey(const xmlChar *nam - */ - static unsigned long - xmlDictComputeFastQKey(const xmlChar *prefix, int plen, -- const xmlChar *name, int len) -+ const xmlChar *name, int len, int seed) - { -- unsigned long value = 0L; -+ unsigned long value = (unsigned long) seed; - - if (plen == 0) - value += 30 * (unsigned long) ':'; -@@ -460,6 +487,11 @@ xmlDictCreate(void) { - dict->subdict = NULL; - if (dict->dict) { - memset(dict->dict, 0, MIN_DICT_SIZE * sizeof(xmlDictEntry)); -+#ifdef DICT_RANDOMIZATION -+ dict->seed = rand(); -+#else -+ dict->seed = 0; -+#endif - return(dict); - } - xmlFree(dict); -@@ -486,6 +518,7 @@ xmlDictCreateSub(xmlDictPtr sub) { - #ifdef DICT_DEBUG_PATTERNS - fprintf(stderr, "R"); - #endif -+ dict->seed = sub->seed; - dict->subdict = sub; - xmlDictReference(dict->subdict); - } diff --git a/textproc/libxml2/patches/patch-CVE-2012-0841-ab b/textproc/libxml2/patches/patch-CVE-2012-0841-ab deleted file mode 100644 index 548c9242dfc..00000000000 --- a/textproc/libxml2/patches/patch-CVE-2012-0841-ab +++ /dev/null @@ -1,93 +0,0 @@ -$NetBSD: patch-CVE-2012-0841-ab,v 1.1 2012/03/09 12:12:28 drochner Exp $ - -patch 8973d58b7498fa5100a876815476b81fd1a2412a - ---- hash.c.orig 2010-10-12 06:25:32.000000000 +0000 -+++ hash.c -@@ -3,7 +3,7 @@ - * - * Reference: Your favorite introductory book on algorithms - * -- * Copyright (C) 2000 Bjorn Reese and Daniel Veillard. -+ * Copyright (C) 2000,2012 Bjorn Reese and Daniel Veillard. - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above -@@ -21,6 +21,22 @@ - #include "libxml.h" - - #include <string.h> -+#ifdef HAVE_STDLIB_H -+#include <stdlib.h> -+#endif -+#ifdef HAVE_TIME_H -+#include <time.h> -+#endif -+ -+/* -+ * Following http://www.ocert.org/advisories/ocert-2011-003.html -+ * it seems that having hash randomization might be a good idea -+ * when using XML with untrusted data -+ */ -+#if defined(HAVE_RAND) && defined(HAVE_SRAND) && defined(HAVE_TIME) -+#define HASH_RANDOMIZATION -+#endif -+ - #include <libxml/parser.h> - #include <libxml/hash.h> - #include <libxml/xmlmemory.h> -@@ -31,6 +47,10 @@ - - /* #define DEBUG_GROW */ - -+#ifdef HASH_RANDOMIZATION -+static int hash_initialized = 0; -+#endif -+ - /* - * A single entry in the hash table - */ -@@ -53,6 +73,9 @@ struct _xmlHashTable { - int size; - int nbElems; - xmlDictPtr dict; -+#ifdef HASH_RANDOMIZATION -+ int random_seed; -+#endif - }; - - /* -@@ -65,6 +88,9 @@ xmlHashComputeKey(xmlHashTablePtr table, - unsigned long value = 0L; - char ch; - -+#ifdef HASH_RANDOMIZATION -+ value = table->random_seed; -+#endif - if (name != NULL) { - value += 30 * (*name); - while ((ch = *name++) != 0) { -@@ -92,6 +118,9 @@ xmlHashComputeQKey(xmlHashTablePtr table - unsigned long value = 0L; - char ch; - -+#ifdef HASH_RANDOMIZATION -+ value = table->random_seed; -+#endif - if (prefix != NULL) - value += 30 * (*prefix); - else -@@ -156,6 +185,13 @@ xmlHashCreate(int size) { - table->table = xmlMalloc(size * sizeof(xmlHashEntry)); - if (table->table) { - memset(table->table, 0, size * sizeof(xmlHashEntry)); -+#ifdef HASH_RANDOMIZATION -+ if (!hash_initialized) { -+ srand(time(NULL)); -+ hash_initialized = 1; -+ } -+ table->random_seed = rand(); -+#endif - return(table); - } - xmlFree(table); diff --git a/textproc/libxml2/patches/patch-CVE-2012-0841-ac b/textproc/libxml2/patches/patch-CVE-2012-0841-ac deleted file mode 100644 index 324dfb0c7d8..00000000000 --- a/textproc/libxml2/patches/patch-CVE-2012-0841-ac +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-CVE-2012-0841-ac,v 1.1 2012/03/09 12:12:28 drochner Exp $ - -avoid to modify "configure", to keep the patch simple - ---- config.h.in.orig 2010-11-04 17:28:15.000000000 +0000 -+++ config.h.in -@@ -309,3 +309,8 @@ - - /* Win32 Std C name mangling work-around */ - #undef vsnprintf -+ -+/* XXX assume that POSIX functions are present */ -+#define HAVE_RAND 1 -+#define HAVE_SRAND 1 -+#define HAVE_TIME 1 diff --git a/textproc/libxml2/patches/patch-ab b/textproc/libxml2/patches/patch-ab index 78e09db984d..47b93d9f8b0 100644 --- a/textproc/libxml2/patches/patch-ab +++ b/textproc/libxml2/patches/patch-ab @@ -1,17 +1,8 @@ -$NetBSD: patch-ab,v 1.23 2012/04/03 09:08:33 obache Exp $ +$NetBSD: patch-ab,v 1.24 2012/06/03 22:18:34 wiz Exp $ ---- configure.orig 2010-11-04 17:28:14.000000000 +0000 +--- configure.orig 2012-05-23 08:56:30.000000000 +0000 +++ configure -@@ -11414,7 +11414,7 @@ else - esac - fi - -- if test -z "$VERSION_SCRIPT_FLAGS"; then -+ if test \! -z "$VERSION_SCRIPT_FLAGS"; then - USE_VERSION_SCRIPT_TRUE= - USE_VERSION_SCRIPT_FALSE='#' - else -@@ -13364,7 +13364,7 @@ fi +@@ -14088,7 +14088,7 @@ fi fi @@ -20,15 +11,15 @@ $NetBSD: patch-ab,v 1.23 2012/04/03 09:08:33 obache Exp $ XML_INCLUDEDIR='-I${includedir}/libxml2' XML_CFLAGS="" -@@ -13815,13 +13815,13 @@ else +@@ -14553,13 +14553,13 @@ else if test "$with_threads" = "pthread" || test "$with_threads" = "" || test "$with_threads" = "yes" ; then - ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" - if test "x$ac_cv_header_pthread_h" = x""yes; then : + ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" + if test "x$ac_cv_header_pthread_h" = xyes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in -lpthread" >&5 -$as_echo_n "checking for pthread_join in -lpthread... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}" >&5 +$as_echo_n "checking for pthread_join in ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}... " >&6; } - if test "${ac_cv_lib_pthread_pthread_join+set}" = set; then : + if ${ac_cv_lib_pthread_pthread_join+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -37,16 +28,16 @@ $NetBSD: patch-ab,v 1.23 2012/04/03 09:08:33 obache Exp $ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -@@ -13853,7 +13853,7 @@ fi +@@ -14591,7 +14591,7 @@ fi $as_echo "$ac_cv_lib_pthread_pthread_join" >&6; } - if test "x$ac_cv_lib_pthread_pthread_join" = x""yes; then : + if test "x$ac_cv_lib_pthread_pthread_join" = xyes; then : -- THREAD_LIBS="-lpthread" -+ THREAD_LIBS="${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}" +- THREAD_LIBS="-lpthread" ++ THREAD_LIBS="${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}" $as_echo "#define HAVE_LIBPTHREAD /**/" >>confdefs.h -@@ -13879,7 +13879,7 @@ fi +@@ -14613,12 +14613,12 @@ fi *beos*) WITH_THREADS="1" THREAD_CFLAGS="$THREAD_CFLAGS -DHAVE_BEOS_THREADS" ;; @@ -55,7 +46,13 @@ $NetBSD: patch-ab,v 1.23 2012/04/03 09:08:33 obache Exp $ if test "${GCC}" = "yes" ; then GCC_VERSION=`${CC} --version | head -1 | awk '{print $3}'` GCC_MAJOR=`echo ${GCC_VERSION} | sed 's+\..*++'` -@@ -13901,6 +13901,10 @@ fi + GCC_MEDIUM=`echo ${GCC_VERSION} | sed 's+[0-9]*\.++' | sed 's+\..*++'` +- if test "${THREAD_LIBS}" = "-lpthread" ; then ++ if test "${THREAD_LIBS}" = "${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}" ; then + if expr ${GCC_MEDIUM} \> 2 \& ${GCC_MAJOR} = 3 > /dev/null + then + THREAD_LIBS="" +@@ -14635,6 +14635,10 @@ fi fi fi ;; @@ -66,18 +63,14 @@ $NetBSD: patch-ab,v 1.23 2012/04/03 09:08:33 obache Exp $ esac if test "$WITH_THREADS" = "1" ; then THREAD_CFLAGS="$THREAD_CFLAGS -D_REENTRANT" -@@ -14582,10 +14586,10 @@ $as_echo "#define snprintf _snprintf" >> +@@ -15310,10 +15314,6 @@ case "$host" in - $as_echo "#define vsnprintf _vsnprintf" >>confdefs.h + $as_echo "#define _WINSOCKAPI_ 1" >>confdefs.h - if test "${PYTHON}" != "" - then -- WIN32_EXTRA_PYTHON_LIBADD="-L${pythondir}/../../libs -lpython${PYTHON_VERSION//./}" +- WIN32_EXTRA_PYTHON_LIBADD="-L${pythondir}/../../libs -lpython$(echo ${PYTHON_VERSION} | tr -d .)" - fi -+# if test "${PYTHON}" != "" -+# then -+# WIN32_EXTRA_PYTHON_LIBADD="-L${pythondir}/../../libs -lpython${PYTHON_VERSION//./}" -+# fi ;; *-*-cygwin*) CYGWIN_EXTRA_LDFLAGS="-no-undefined" diff --git a/textproc/libxml2/patches/patch-ag b/textproc/libxml2/patches/patch-ag index 173890eb3a5..fee13a1fe56 100644 --- a/textproc/libxml2/patches/patch-ag +++ b/textproc/libxml2/patches/patch-ag @@ -1,8 +1,8 @@ -$NetBSD: patch-ag,v 1.9 2011/11/01 19:21:06 spz Exp $ +$NetBSD: patch-ag,v 1.10 2012/06/03 22:18:34 wiz Exp $ ---- encoding.c.orig 2010-11-04 16:40:06.000000000 +0000 +--- encoding.c.orig 2009-09-24 17:31:59.000000000 +0200 +++ encoding.c -@@ -1429,6 +1429,9 @@ xmlInitCharEncodingHandlers(void) { +@@ -1376,6 +1376,9 @@ xmlInitCharEncodingHandlers(void) { xmlRegisterCharEncodingHandlersISO8859x (); #endif #endif @@ -12,21 +12,3 @@ $NetBSD: patch-ag,v 1.9 2011/11/01 19:21:06 spz Exp $ } -@@ -1928,7 +1931,7 @@ xmlCharEncFirstLineInt(xmlCharEncodingHa - if (in == NULL) return(-1); - - /* calculate space available */ -- written = out->size - out->use; -+ written = out->size - out->use - 1; /* count '\0' */ - toconv = in->use; - /* - * echo '<?xml version="1.0" encoding="UCS4"?>' | wc -c => 38 -@@ -2059,7 +2062,7 @@ xmlCharEncInFunc(xmlCharEncodingHandler - toconv = in->use; - if (toconv == 0) - return (0); -- written = out->size - out->use; -+ written = out->size - out->use - 1; /* count '\0' */ - if (toconv * 2 >= written) { - xmlBufferGrow(out, out->size + toconv * 2); - written = out->size - out->use - 1; diff --git a/textproc/libxml2/patches/patch-aj b/textproc/libxml2/patches/patch-aj index a758c21c204..dc2b90d8933 100644 --- a/textproc/libxml2/patches/patch-aj +++ b/textproc/libxml2/patches/patch-aj @@ -1,18 +1,18 @@ -$NetBSD: patch-aj,v 1.1 2010/04/28 08:54:30 obache Exp $ +$NetBSD: patch-aj,v 1.2 2012/06/03 22:18:34 wiz Exp $ Inlucde resolv.h conditionally: https://bugzilla.gnome.org/show_bug.cgi?id=617053 ---- nanohttp.c.orig 2009-10-19 11:55:48.000000000 +0000 +--- nanohttp.c.orig 2012-05-11 02:09:01.000000000 +0000 +++ nanohttp.c -@@ -65,8 +65,10 @@ - #include <strings.h> +@@ -43,8 +43,10 @@ + #ifdef HAVE_ARPA_NAMESER_H + #include <arpa/nameser.h> #endif - #ifdef SUPPORT_IP6 +#ifdef HAVE_RESOLV_H #include <resolv.h> #endif +#endif - #ifdef HAVE_ZLIB_H - #include <zlib.h> + #ifdef HAVE_FCNTL_H + #include <fcntl.h> #endif diff --git a/textproc/libxml2/patches/patch-ak b/textproc/libxml2/patches/patch-ak deleted file mode 100644 index b2def79c628..00000000000 --- a/textproc/libxml2/patches/patch-ak +++ /dev/null @@ -1,350 +0,0 @@ -$NetBSD: patch-ak,v 1.3 2011/11/01 19:21:06 spz Exp $ - ---- xpath.c.orig 2010-11-03 19:18:27.000000000 +0000 -+++ xpath.c -@@ -252,6 +252,7 @@ static const char *xmlXPathErrorMessages - "Encoding error\n", - "Char out of XML range\n", - "Invalid or incomplete context\n", -+ "Stack usage errror\n", - "?? Unknown error ??\n" /* Must be last in the list! */ - }; - #define MAXERRNO ((int)(sizeof(xmlXPathErrorMessages) / \ -@@ -722,14 +723,13 @@ xmlXPathCompExprAdd(xmlXPathCompExprPtr - if (comp->nbStep >= comp->maxStep) { - xmlXPathStepOp *real; - -- comp->maxStep *= 2; - real = (xmlXPathStepOp *) xmlRealloc(comp->steps, -- comp->maxStep * sizeof(xmlXPathStepOp)); -+ comp->maxStep * 2 * sizeof(xmlXPathStepOp)); - if (real == NULL) { -- comp->maxStep /= 2; - xmlXPathErrMemory(NULL, "adding step\n"); - return(-1); - } -+ comp->maxStep *= 2; - comp->steps = real; - } - comp->last = comp->nbStep; -@@ -2398,6 +2398,42 @@ xmlXPathCacheConvertNumber(xmlXPathConte - ************************************************************************/ - - /** -+ * xmlXPathSetFrame: -+ * @ctxt: an XPath parser context -+ * -+ * Set the callee evaluation frame -+ * -+ * Returns the previous frame value to be restored once done -+ */ -+static int -+xmlXPathSetFrame(xmlXPathParserContextPtr ctxt) { -+ int ret; -+ -+ if (ctxt == NULL) -+ return(0); -+ ret = ctxt->valueFrame; -+ ctxt->valueFrame = ctxt->valueNr; -+ return(ret); -+} -+ -+/** -+ * xmlXPathPopFrame: -+ * @ctxt: an XPath parser context -+ * @frame: the previous frame value -+ * -+ * Remove the callee evaluation frame -+ */ -+static void -+xmlXPathPopFrame(xmlXPathParserContextPtr ctxt, int frame) { -+ if (ctxt == NULL) -+ return; -+ if (ctxt->valueNr < ctxt->valueFrame) { -+ xmlXPatherror(ctxt, __FILE__, __LINE__, XPATH_STACK_ERROR); -+ } -+ ctxt->valueFrame = frame; -+} -+ -+/** - * valuePop: - * @ctxt: an XPath evaluation context - * -@@ -2412,6 +2448,12 @@ valuePop(xmlXPathParserContextPtr ctxt) - - if ((ctxt == NULL) || (ctxt->valueNr <= 0)) - return (NULL); -+ -+ if (ctxt->valueNr <= ctxt->valueFrame) { -+ xmlXPatherror(ctxt, __FILE__, __LINE__, XPATH_STACK_ERROR); -+ return (NULL); -+ } -+ - ctxt->valueNr--; - if (ctxt->valueNr > 0) - ctxt->value = ctxt->valueTab[ctxt->valueNr - 1]; -@@ -2442,6 +2484,7 @@ valuePush(xmlXPathParserContextPtr ctxt, - sizeof(ctxt->valueTab[0])); - if (tmp == NULL) { - xmlGenericError(xmlGenericErrorContext, "realloc failed !\n"); -+ ctxt->error = XPATH_MEMORY_ERROR; - return (0); - } - ctxt->valueMax *= 2; -@@ -3522,13 +3565,13 @@ xmlXPathNodeSetAddNs(xmlNodeSetPtr cur, - } else if (cur->nodeNr == cur->nodeMax) { - xmlNodePtr *temp; - -- cur->nodeMax *= 2; -- temp = (xmlNodePtr *) xmlRealloc(cur->nodeTab, cur->nodeMax * -+ temp = (xmlNodePtr *) xmlRealloc(cur->nodeTab, cur->nodeMax * 2 * - sizeof(xmlNodePtr)); - if (temp == NULL) { - xmlXPathErrMemory(NULL, "growing nodeset\n"); - return; - } -+ cur->nodeMax *= 2; - cur->nodeTab = temp; - } - cur->nodeTab[cur->nodeNr++] = xmlXPathNodeSetDupNs(node, ns); -@@ -3575,13 +3618,13 @@ xmlXPathNodeSetAdd(xmlNodeSetPtr cur, xm - } else if (cur->nodeNr == cur->nodeMax) { - xmlNodePtr *temp; - -- cur->nodeMax *= 2; -- temp = (xmlNodePtr *) xmlRealloc(cur->nodeTab, cur->nodeMax * -+ temp = (xmlNodePtr *) xmlRealloc(cur->nodeTab, cur->nodeMax * 2 * - sizeof(xmlNodePtr)); - if (temp == NULL) { - xmlXPathErrMemory(NULL, "growing nodeset\n"); - return; - } -+ cur->nodeMax *= 2; - cur->nodeTab = temp; - } - if (val->type == XML_NAMESPACE_DECL) { -@@ -3627,14 +3670,14 @@ xmlXPathNodeSetAddUnique(xmlNodeSetPtr c - } else if (cur->nodeNr == cur->nodeMax) { - xmlNodePtr *temp; - -- cur->nodeMax *= 2; -- temp = (xmlNodePtr *) xmlRealloc(cur->nodeTab, cur->nodeMax * -+ temp = (xmlNodePtr *) xmlRealloc(cur->nodeTab, cur->nodeMax * 2 * - sizeof(xmlNodePtr)); - if (temp == NULL) { - xmlXPathErrMemory(NULL, "growing nodeset\n"); - return; - } - cur->nodeTab = temp; -+ cur->nodeMax *= 2; - } - if (val->type == XML_NAMESPACE_DECL) { - xmlNsPtr ns = (xmlNsPtr) val; -@@ -3738,13 +3781,13 @@ xmlXPathNodeSetMerge(xmlNodeSetPtr val1, - } else if (val1->nodeNr == val1->nodeMax) { - xmlNodePtr *temp; - -- val1->nodeMax *= 2; -- temp = (xmlNodePtr *) xmlRealloc(val1->nodeTab, val1->nodeMax * -+ temp = (xmlNodePtr *) xmlRealloc(val1->nodeTab, val1->nodeMax * 2 * - sizeof(xmlNodePtr)); - if (temp == NULL) { - xmlXPathErrMemory(NULL, "merging nodeset\n"); - return(NULL); - } -+ val1->nodeMax *= 2; - val1->nodeTab = temp; - } - if (n2->type == XML_NAMESPACE_DECL) { -@@ -3800,13 +3843,13 @@ xmlXPathNodeSetMergeUnique(xmlNodeSetPtr - } else if (val1->nodeNr == val1->nodeMax) { - xmlNodePtr *temp; - -- val1->nodeMax *= 2; -- temp = (xmlNodePtr *) xmlRealloc(val1->nodeTab, val1->nodeMax * -+ temp = (xmlNodePtr *) xmlRealloc(val1->nodeTab, val1->nodeMax * 2 * - sizeof(xmlNodePtr)); - if (temp == NULL) { - xmlXPathErrMemory(NULL, "merging nodeset\n"); - return(NULL); - } -+ val1->nodeMax *= 2; - val1->nodeTab = temp; - } - if (val2->nodeTab[i]->type == XML_NAMESPACE_DECL) { -@@ -3907,13 +3950,13 @@ xmlXPathNodeSetMergeAndClear(xmlNodeSetP - } else if (set1->nodeNr >= set1->nodeMax) { - xmlNodePtr *temp; - -- set1->nodeMax *= 2; - temp = (xmlNodePtr *) xmlRealloc( -- set1->nodeTab, set1->nodeMax * sizeof(xmlNodePtr)); -+ set1->nodeTab, set1->nodeMax * 2 * sizeof(xmlNodePtr)); - if (temp == NULL) { - xmlXPathErrMemory(NULL, "merging nodeset\n"); - return(NULL); - } -+ set1->nodeMax *= 2; - set1->nodeTab = temp; - } - if (n2->type == XML_NAMESPACE_DECL) { -@@ -3991,13 +4034,13 @@ xmlXPathNodeSetMergeAndClearNoDupls(xmlN - } else if (set1->nodeNr >= set1->nodeMax) { - xmlNodePtr *temp; - -- set1->nodeMax *= 2; - temp = (xmlNodePtr *) xmlRealloc( -- set1->nodeTab, set1->nodeMax * sizeof(xmlNodePtr)); -+ set1->nodeTab, set1->nodeMax * 2 * sizeof(xmlNodePtr)); - if (temp == NULL) { - xmlXPathErrMemory(NULL, "merging nodeset\n"); - return(NULL); - } -+ set1->nodeMax *= 2; - set1->nodeTab = temp; - } - set1->nodeTab[set1->nodeNr++] = n2; -@@ -6154,6 +6197,7 @@ xmlXPathCompParserContext(xmlXPathCompEx - ret->valueNr = 0; - ret->valueMax = 10; - ret->value = NULL; -+ ret->valueFrame = 0; - - ret->context = ctxt; - ret->comp = comp; -@@ -9296,6 +9340,7 @@ xmlXPathTranslateFunction(xmlXPathParser - if ( (ch & 0xc0) != 0xc0 ) { - xmlGenericError(xmlGenericErrorContext, - "xmlXPathTranslateFunction: Invalid UTF8 string\n"); -+ /* not asserting an XPath error is probably better */ - break; - } - /* then skip over remaining bytes for this char */ -@@ -9303,6 +9348,7 @@ xmlXPathTranslateFunction(xmlXPathParser - if ( (*cptr++ & 0xc0) != 0x80 ) { - xmlGenericError(xmlGenericErrorContext, - "xmlXPathTranslateFunction: Invalid UTF8 string\n"); -+ /* not asserting an XPath error is probably better */ - break; - } - if (ch & 0x80) /* must have had error encountered */ -@@ -11712,6 +11758,7 @@ xmlXPathCompOpEvalPositionalPredicate(xm - xmlXPathObjectPtr contextObj = NULL, exprRes = NULL; - xmlNodePtr oldContextNode, contextNode = NULL; - xmlXPathContextPtr xpctxt = ctxt->context; -+ int frame; - - #ifdef LIBXML_XPTR_ENABLED - /* -@@ -11731,6 +11778,8 @@ xmlXPathCompOpEvalPositionalPredicate(xm - */ - exprOp = &ctxt->comp->steps[op->ch2]; - for (i = 0; i < set->nodeNr; i++) { -+ xmlXPathObjectPtr tmp; -+ - if (set->nodeTab[i] == NULL) - continue; - -@@ -11758,18 +11807,25 @@ xmlXPathCompOpEvalPositionalPredicate(xm - xmlXPathNodeSetAddUnique(contextObj->nodesetval, - contextNode); - -+ frame = xmlXPathSetFrame(ctxt); - valuePush(ctxt, contextObj); - res = xmlXPathCompOpEvalToBoolean(ctxt, exprOp, 1); -+ tmp = valuePop(ctxt); -+ xmlXPathPopFrame(ctxt, frame); - - if ((ctxt->error != XPATH_EXPRESSION_OK) || (res == -1)) { -- xmlXPathObjectPtr tmp; -- /* pop the result */ -- tmp = valuePop(ctxt); -- xmlXPathReleaseObject(xpctxt, tmp); -- /* then pop off contextObj, which will be freed later */ -- valuePop(ctxt); -+ while (tmp != contextObj) { -+ /* -+ * Free up the result -+ * then pop off contextObj, which will be freed later -+ */ -+ xmlXPathReleaseObject(xpctxt, tmp); -+ tmp = valuePop(ctxt); -+ } - goto evaluation_error; - } -+ /* push the result back onto the stack */ -+ valuePush(ctxt, tmp); - - if (res) - pos++; -@@ -13357,6 +13413,7 @@ xmlXPathCompOpEval(xmlXPathParserContext - xmlGenericError(xmlGenericErrorContext, - "xmlXPathCompOpEval: variable %s bound to undefined prefix %s\n", - (char *) op->value4, (char *)op->value5); -+ ctxt->error = XPATH_UNDEF_PREFIX_ERROR; - return (total); - } - val = xmlXPathVariableLookupNS(ctxt->context, -@@ -13373,7 +13430,9 @@ xmlXPathCompOpEval(xmlXPathParserContext - xmlXPathFunction func; - const xmlChar *oldFunc, *oldFuncURI; - int i; -+ int frame; - -+ frame = xmlXPathSetFrame(ctxt); - if (op->ch1 != -1) - total += - xmlXPathCompOpEval(ctxt, &comp->steps[op->ch1]); -@@ -13381,15 +13440,18 @@ xmlXPathCompOpEval(xmlXPathParserContext - xmlGenericError(xmlGenericErrorContext, - "xmlXPathCompOpEval: parameter error\n"); - ctxt->error = XPATH_INVALID_OPERAND; -+ xmlXPathPopFrame(ctxt, frame); - return (total); - } -- for (i = 0; i < op->value; i++) -+ for (i = 0; i < op->value; i++) { - if (ctxt->valueTab[(ctxt->valueNr - 1) - i] == NULL) { - xmlGenericError(xmlGenericErrorContext, - "xmlXPathCompOpEval: parameter error\n"); - ctxt->error = XPATH_INVALID_OPERAND; -+ xmlXPathPopFrame(ctxt, frame); - return (total); - } -+ } - if (op->cache != NULL) - XML_CAST_FPTR(func) = op->cache; - else { -@@ -13405,6 +13467,8 @@ xmlXPathCompOpEval(xmlXPathParserContext - xmlGenericError(xmlGenericErrorContext, - "xmlXPathCompOpEval: function %s bound to undefined prefix %s\n", - (char *)op->value4, (char *)op->value5); -+ xmlXPathPopFrame(ctxt, frame); -+ ctxt->error = XPATH_UNDEF_PREFIX_ERROR; - return (total); - } - func = xmlXPathFunctionLookupNS(ctxt->context, -@@ -13426,6 +13490,7 @@ xmlXPathCompOpEval(xmlXPathParserContext - func(ctxt, op->value); - ctxt->context->function = oldFunc; - ctxt->context->functionURI = oldFuncURI; -+ xmlXPathPopFrame(ctxt, frame); - return (total); - } - case XPATH_OP_ARG: -@@ -13982,6 +14047,7 @@ xmlXPathCompOpEval(xmlXPathParserContext - } - xmlGenericError(xmlGenericErrorContext, - "XPath: unknown precompiled operation %d\n", op->op); -+ ctxt->error = XPATH_INVALID_OPERAND; - return (total); - } - -@@ -14329,6 +14395,7 @@ xmlXPathRunEval(xmlXPathParserContextPtr - ctxt->valueNr = 0; - ctxt->valueMax = 10; - ctxt->value = NULL; -+ ctxt->valueFrame = 0; - } - #ifdef XPATH_STREAMING - if (ctxt->comp->stream) { diff --git a/textproc/libxml2/patches/patch-al b/textproc/libxml2/patches/patch-al deleted file mode 100644 index 41a55634147..00000000000 --- a/textproc/libxml2/patches/patch-al +++ /dev/null @@ -1,93 +0,0 @@ -$NetBSD: patch-al,v 1.3 2012/01/17 14:43:44 drochner Exp $ - --from gnome git: Fix some potential problems on reallocation failures --CVE-2011-3919 --from gnome git: Fix memory corruption --CVE-2011-3905 - ---- parser.c.orig 2012-01-17 10:21:47.000000000 +0000 -+++ parser.c -@@ -1819,15 +1819,14 @@ namePush(xmlParserCtxtPtr ctxt, const xm - - if (ctxt->nameNr >= ctxt->nameMax) { - const xmlChar * *tmp; -- ctxt->nameMax *= 2; - tmp = (const xmlChar * *) xmlRealloc((xmlChar * *)ctxt->nameTab, -- ctxt->nameMax * -+ ctxt->nameMax * 2 * - sizeof(ctxt->nameTab[0])); - if (tmp == NULL) { -- ctxt->nameMax /= 2; - goto mem_error; - } - ctxt->nameTab = tmp; -+ ctxt->nameMax *= 2; - } - ctxt->nameTab[ctxt->nameNr] = value; - ctxt->name = value; -@@ -2709,7 +2708,7 @@ xmlStringLenDecodeEntities(xmlParserCtxt - - buffer[nbchars++] = '&'; - if (nbchars > buffer_size - i - XML_PARSER_BUFFER_SIZE) { -- growBuffer(buffer, XML_PARSER_BUFFER_SIZE); -+ growBuffer(buffer, i + XML_PARSER_BUFFER_SIZE); - } - for (;i > 0;i--) - buffer[nbchars++] = *cur++; -@@ -4949,7 +4948,8 @@ xmlParsePI(xmlParserCtxtPtr ctxt) { - (ctxt->sax->processingInstruction != NULL)) - ctxt->sax->processingInstruction(ctxt->userData, - target, NULL); -- ctxt->instate = state; -+ if (ctxt->instate != XML_PARSER_EOF) -+ ctxt->instate = state; - return; - } - buf = (xmlChar *) xmlMallocAtomic(size * sizeof(xmlChar)); -@@ -5029,7 +5029,8 @@ xmlParsePI(xmlParserCtxtPtr ctxt) { - } else { - xmlFatalErr(ctxt, XML_ERR_PI_NOT_STARTED, NULL); - } -- ctxt->instate = state; -+ if (ctxt->instate != XML_PARSER_EOF) -+ ctxt->instate = state; - } - } - -@@ -6992,6 +6993,7 @@ xmlParseReference(xmlParserCtxtPtr ctxt) - ent->owner = 1; - while (list != NULL) { - list->parent = (xmlNodePtr) ent; -+ xmlSetTreeDoc(list, ent->doc); - if (list->next == NULL) - ent->last = list; - list = list->next; -@@ -9588,6 +9590,8 @@ xmlParseElement(xmlParserCtxtPtr ctxt) { - else - name = xmlParseStartTag(ctxt); - #endif /* LIBXML_SAX1_ENABLED */ -+ if (ctxt->instate == XML_PARSER_EOF) -+ return; - if (name == NULL) { - spacePop(ctxt); - return; -@@ -10967,6 +10971,8 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctx - else - name = xmlParseStartTag(ctxt); - #endif /* LIBXML_SAX1_ENABLED */ -+ if (ctxt->instate == XML_PARSER_EOF) -+ goto done; - if (name == NULL) { - spacePop(ctxt); - ctxt->instate = XML_PARSER_EOF; -@@ -11153,7 +11159,9 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctx - else - xmlParseEndTag1(ctxt, 0); - #endif /* LIBXML_SAX1_ENABLED */ -- if (ctxt->nameNr == 0) { -+ if (ctxt->instate == XML_PARSER_EOF) { -+ /* Nothing */ -+ } else if (ctxt->nameNr == 0) { - ctxt->instate = XML_PARSER_EPILOG; - } else { - ctxt->instate = XML_PARSER_CONTENT; diff --git a/textproc/libxml2/patches/patch-include_libxml_xpath.h b/textproc/libxml2/patches/patch-include_libxml_xpath.h deleted file mode 100644 index 6f8d20e6904..00000000000 --- a/textproc/libxml2/patches/patch-include_libxml_xpath.h +++ /dev/null @@ -1,23 +0,0 @@ -$NetBSD: patch-include_libxml_xpath.h,v 1.1 2011/11/01 19:21:06 spz Exp $ - ---- include/libxml/xpath.h.orig 2010-10-12 06:25:32.000000000 +0000 -+++ include/libxml/xpath.h -@@ -68,7 +68,8 @@ typedef enum { - XPATH_UNDEF_PREFIX_ERROR, - XPATH_ENCODING_ERROR, - XPATH_INVALID_CHAR_ERROR, -- XPATH_INVALID_CTXT -+ XPATH_INVALID_CTXT, -+ XPATH_STACK_ERROR - } xmlXPathError; - - /* -@@ -380,6 +381,8 @@ struct _xmlXPathParserContext { - xmlXPathCompExprPtr comp; /* the precompiled expression */ - int xptr; /* it this an XPointer expression */ - xmlNodePtr ancestor; /* used for walking preceding axis */ -+ -+ int valueFrame; /* used to limit Pop on the stack */ - }; - - /************************************************************************ diff --git a/textproc/libxml2/patches/patch-xpointer.c b/textproc/libxml2/patches/patch-xpointer.c deleted file mode 100644 index bc709f8660f..00000000000 --- a/textproc/libxml2/patches/patch-xpointer.c +++ /dev/null @@ -1,41 +0,0 @@ -$NetBSD: patch-xpointer.c,v 1.2 2012/05/21 12:22:54 taca Exp $ - -patches for these security problems: - http://secunia.com/advisories/46632/ - http://secunia.com/advisories/49177/ - ---- xpointer.c.orig 2010-10-12 06:25:33.000000000 +0000 -+++ xpointer.c -@@ -1007,21 +1007,14 @@ xmlXPtrEvalXPtrPart(xmlXPathParserContex - NEXT; - break; - } -- *cur++ = CUR; - } else if (CUR == '(') { - level++; -- *cur++ = CUR; - } else if (CUR == '^') { -- NEXT; -- if ((CUR == ')') || (CUR == '(') || (CUR == '^')) { -- *cur++ = CUR; -- } else { -- *cur++ = '^'; -- *cur++ = CUR; -+ if ((NXT(1) == ')') || (NXT(1) == '(') || (NXT(1) == '^')) { -+ NEXT; - } -- } else { -- *cur++ = CUR; - } -+ *cur++ = CUR; - NEXT; - } - *cur = 0; -@@ -1269,6 +1262,7 @@ xmlXPtrEvalXPointer(xmlXPathParserContex - ctxt->valueNr = 0; - ctxt->valueMax = 10; - ctxt->value = NULL; -+ ctxt->valueFrame = 0; - } - SKIP_BLANKS; - if (CUR == '/') { |