diff options
author | Victor Ostorga <vostorga@gentoo.org> | 2009-08-13 20:30:03 +0000 |
---|---|---|
committer | Victor Ostorga <vostorga@gentoo.org> | 2009-08-13 20:30:03 +0000 |
commit | aa5570f7f959ef66d19aa67f9f50181c28979c3a (patch) | |
tree | 7f52c83893f878d81ae6b099f035395032fe2ea0 | |
parent | Keyword ~alpha (diff) | |
download | historical-aa5570f7f959ef66d19aa67f9f50181c28979c3a.tar.gz historical-aa5570f7f959ef66d19aa67f9f50181c28979c3a.tar.bz2 historical-aa5570f7f959ef66d19aa67f9f50181c28979c3a.zip |
Fix CAN-2004-0110 CAN-2004-0989 CVE-2009-2414 CVE-2009-2416 bug #280617
Package-Manager: portage-2.1.6.13/cvs/Linux i686
-rw-r--r-- | dev-libs/libxml/ChangeLog | 13 | ||||
-rw-r--r-- | dev-libs/libxml/Manifest | 8 | ||||
-rw-r--r-- | dev-libs/libxml/files/libxml-1.8.17-CAN-2004-0110.patch | 218 | ||||
-rw-r--r-- | dev-libs/libxml/files/libxml-1.8.17-CVE-2009-2414-2416.patch | 121 | ||||
-rw-r--r-- | dev-libs/libxml/files/libxml-1.8.17-configure-LANG.patch | 41 | ||||
-rw-r--r-- | dev-libs/libxml/files/libxml-1.8.17-declarations.patch | 172 | ||||
-rw-r--r-- | dev-libs/libxml/files/libxml-1.8.17-open_call_fix.patch | 11 | ||||
-rw-r--r-- | dev-libs/libxml/libxml-1.8.17-r4.ebuild | 54 |
8 files changed, 636 insertions, 2 deletions
diff --git a/dev-libs/libxml/ChangeLog b/dev-libs/libxml/ChangeLog index 0c1c25514ea8..4b7e94ed9f38 100644 --- a/dev-libs/libxml/ChangeLog +++ b/dev-libs/libxml/ChangeLog @@ -1,6 +1,17 @@ # ChangeLog for dev-libs/libxml # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml/ChangeLog,v 1.26 2009/08/09 18:51:07 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml/ChangeLog,v 1.27 2009/08/13 20:30:03 vostorga Exp $ + +*libxml-1.8.17-r4 (13 Aug 2009) + + 13 Aug 2009; VĂctor Ostorga <vostorga@gentoo.org> + +libxml-1.8.17-r4.ebuild, +files/libxml-1.8.17-CAN-2004-0110.patch, + +files/libxml-1.8.17-CVE-2009-2414-2416.patch, + +files/libxml-1.8.17-configure-LANG.patch, + +files/libxml-1.8.17-declarations.patch, + +files/libxml-1.8.17-open_call_fix.patch: + Patch for CAN-2004-0110 and CAN-2004-0989 + Patch for CVE-2009-2414 CVE-2009-2416 bug #280617 09 Aug 2009; Jeroen Roovers <jer@gentoo.org> libxml-1.8.17-r3.ebuild: Stable for HPPA (bug #280470). diff --git a/dev-libs/libxml/Manifest b/dev-libs/libxml/Manifest index e6e6653d59e3..4bf5abea1f0a 100644 --- a/dev-libs/libxml/Manifest +++ b/dev-libs/libxml/Manifest @@ -1,7 +1,13 @@ AUX configure-LANG.patch 1686 RMD160 4ff8355af81705058fd411910dfae94887bcd884 SHA1 67ae0deff73689cb39cd6e7451262bdda9c25a39 SHA256 dc9386b88eac48c282d63d0be7e7be81d4a0a08035a8b97138a61133e057bcea +AUX libxml-1.8.17-CAN-2004-0110.patch 5397 RMD160 3b98cf5fd6dbd7a9e0ac40c433d30621a146d156 SHA1 9012c9199b9d65530ce99850ed71cf748d5d22ea SHA256 6831931f869b94d2f9968acce8df0e0c9130e9f431f13bbfb710d24769732646 +AUX libxml-1.8.17-CVE-2009-2414-2416.patch 3453 RMD160 03420ee5b45af97aebb383f87e5f811db79beebd SHA1 f9089ecf3e5e799e3535508089ea481cdc82ad36 SHA256 21beabe519abb2bb2d92e26028a23011e86eab3021710e4cc86e1b4c4506a657 +AUX libxml-1.8.17-configure-LANG.patch 1686 RMD160 4ff8355af81705058fd411910dfae94887bcd884 SHA1 67ae0deff73689cb39cd6e7451262bdda9c25a39 SHA256 dc9386b88eac48c282d63d0be7e7be81d4a0a08035a8b97138a61133e057bcea +AUX libxml-1.8.17-declarations.patch 5488 RMD160 764661621b9f9fc19870d64606921c9de0adad8d SHA1 159508d9224000aa975ebd90b96dfb32d68f1e5b SHA256 be348a9cd4d2a1e2353ee551b5a3a84238bd503ae86c4b1ae98c05bd319efd5c +AUX libxml-1.8.17-open_call_fix.patch 363 RMD160 d504ae87018452fb4f4908c7b8f63df33520de8e SHA1 8b5bd7aba70b055c1588dd2f69633e6942c225b2 SHA256 7a9aec42a5e3fe2278eac4273e4315518136888089de1a2a17874e1935154995 AUX open_call_fix.patch 363 RMD160 d504ae87018452fb4f4908c7b8f63df33520de8e SHA1 8b5bd7aba70b055c1588dd2f69633e6942c225b2 SHA256 7a9aec42a5e3fe2278eac4273e4315518136888089de1a2a17874e1935154995 DIST libxml-1.8.17.tar.gz 996351 RMD160 3d01879e6e5a38f4453d009ea8bd2d2fc9e86bcc SHA1 ebe7b76bb2b62c882000c1a846a6f8f8346e3bb4 SHA256 bffd3178dec8d75e2cfe05f4a4c36319c8fd3206209e32ef84e1a7c5173a86ed EBUILD libxml-1.8.17-r2.ebuild 1244 RMD160 4c44af3c260da701a8973e72ba24a5e2bb0d370b SHA1 5129f8ece342d3ab32fdf36f5454a3cc51331dd9 SHA256 89d296a2c6d1a33b3d34e9c3f127f82a7dbfceb425fe2ae82dd3f9b741e17d95 EBUILD libxml-1.8.17-r3.ebuild 1307 RMD160 5ad1220f614f58e2ad2a9b18b1c491e7a2b355a4 SHA1 0ab9620e9271ea80fdcc45b612fb225b3f6237ef SHA256 d07b9d6b2b2e4f668b396234b9292bbd9db2bdc93afc23a8325877e5f15d44ed -MISC ChangeLog 3347 RMD160 0ec42118f53684273a0136cbd1eb3f33c8c7a1a6 SHA1 368cabfd062a91fe3a3e21eb81508c27a1850831 SHA256 712966d475a97fd5045b987fb5e7209fc41ec40b4d86f4283a5eb330a12a32fc +EBUILD libxml-1.8.17-r4.ebuild 1469 RMD160 12f6b0ffd3962ed8a2bd08b2784a936a6e7e0d5b SHA1 d03d8daca4095dbd5496088bacac29e398d9fbb5 SHA256 51cd9ab01fc01ea0733d4c1a5a93ddc125daa6c3639e2d2c96aa614a34e693e4 +MISC ChangeLog 3786 RMD160 461a1e86a7d0320a32233f0596a697f38733a481 SHA1 7100084ee075fb20c6f2b80f030173033d7b21f6 SHA256 59bfcdae564e127df09175ed8c940a00dbc347fd1201f8854651ebc7efef8101 MISC metadata.xml 231 RMD160 c13056229989c3d4f448a7c7abcff3f4ee7ce13c SHA1 2d63dfb700b223f8f37c078692a81b2237896bce SHA256 4595c2615fd7c9095517949b1a920d4457f92801eb9d46307b18aafe58ec2a8a diff --git a/dev-libs/libxml/files/libxml-1.8.17-CAN-2004-0110.patch b/dev-libs/libxml/files/libxml-1.8.17-CAN-2004-0110.patch new file mode 100644 index 000000000000..45d4cfb95c27 --- /dev/null +++ b/dev-libs/libxml/files/libxml-1.8.17-CAN-2004-0110.patch @@ -0,0 +1,218 @@ +diff -NrU5 libxml-1.8.17.original/nanoftp.c libxml-1.8.17/nanoftp.c +--- libxml-1.8.17.original/nanoftp.c 2009-08-13 20:09:55.000000000 +0000 ++++ libxml-1.8.17/nanoftp.c 2009-08-13 20:11:39.000000000 +0000 +@@ -219,24 +219,24 @@ + xmlFree(ctxt->path); + ctxt->path = NULL; + } + if (URL == NULL) return; + buf[index] = 0; +- while (*cur != 0) { ++ while ((*cur != 0) && (index < 4090)) { + if ((cur[0] == ':') && (cur[1] == '/') && (cur[2] == '/')) { + buf[index] = 0; + ctxt->protocol = xmlMemStrdup(buf); + index = 0; + cur += 3; + break; + } + buf[index++] = *cur++; + } +- if (*cur == 0) return; ++ if ((*cur == 0) || (index >= 4090)) return; + + buf[index] = 0; +- while (1) { ++ while (index < 4090) { + if (cur[0] == ':') { + buf[index] = 0; + ctxt->hostname = xmlMemStrdup(buf); + index = 0; + cur += 1; +@@ -256,16 +256,16 @@ + index = 0; + break; + } + buf[index++] = *cur++; + } +- if (*cur == 0) ++ if ((*cur == 0) || (index >= 4090)) + ctxt->path = xmlMemStrdup("/"); + else { + index = 0; + buf[index] = 0; +- while (*cur != 0) ++ while ((*cur != 0) && (index < 4090)) + buf[index++] = *cur++; + buf[index] = 0; + ctxt->path = xmlMemStrdup(buf); + } + } +@@ -299,26 +299,26 @@ + if (ctxt->protocol == NULL) + return(-1); + if (ctxt->hostname == NULL) + return(-1); + buf[index] = 0; +- while (*cur != 0) { ++ while ((*cur != 0) && (index < 4090)) { + if ((cur[0] == ':') && (cur[1] == '/') && (cur[2] == '/')) { + buf[index] = 0; + if (strcmp(ctxt->protocol, buf)) + return(-1); + index = 0; + cur += 3; + break; + } + buf[index++] = *cur++; + } +- if (*cur == 0) ++ if ((*cur == 0) || (index >= 4090)) + return(-1); + + buf[index] = 0; +- while (1) { ++ while (index < 4090) { + if (cur[0] == ':') { + buf[index] = 0; + if (strcmp(ctxt->hostname, buf)) + return(-1); + index = 0; +@@ -346,16 +346,16 @@ + if (ctxt->path != NULL) { + xmlFree(ctxt->path); + ctxt->path = NULL; + } + +- if (*cur == 0) ++ if ((*cur == 0) || (index >= 4090)) + ctxt->path = xmlMemStrdup("/"); + else { + index = 0; + buf[index] = 0; +- while (*cur != 0) ++ while ((*cur != 0) && (index < 4090)) + buf[index++] = *cur++; + buf[index] = 0; + ctxt->path = xmlMemStrdup(buf); + } + return(0); +@@ -391,23 +391,23 @@ + else + printf("Using FTP proxy %s\n", URL); + #endif + if (URL == NULL) return; + buf[index] = 0; +- while (*cur != 0) { ++ while ((*cur != 0) && (index < 4090)) { + if ((cur[0] == ':') && (cur[1] == '/') && (cur[2] == '/')) { + buf[index] = 0; + index = 0; + cur += 3; + break; + } + buf[index++] = *cur++; + } +- if (*cur == 0) return; ++ if ((*cur == 0) || (index >= 4090)) return; + + buf[index] = 0; +- while (1) { ++ while (index < 4090) { + if (cur[0] == ':') { + buf[index] = 0; + proxy = xmlMemStrdup(buf); + index = 0; + cur += 1; +@@ -825,10 +825,14 @@ + hp = gethostbyname(proxy); + else + hp = gethostbyname(ctxt->hostname); + if (hp == NULL) + return(-1); ++ if (hp->h_length > ++ sizeof(((struct sockaddr_in *)&ctxt->ftpAddr)->sin_addr)) { ++ return(-1); ++ } + + /* + * Prepare the socket + */ + memset(&ctxt->ftpAddr, 0, sizeof(ctxt->ftpAddr)); +diff -NrU5 libxml-1.8.17.original/nanohttp.c libxml-1.8.17/nanohttp.c +--- libxml-1.8.17.original/nanohttp.c 2009-08-13 20:09:55.000000000 +0000 ++++ libxml-1.8.17/nanohttp.c 2009-08-13 20:11:39.000000000 +0000 +@@ -175,24 +175,24 @@ + xmlFree(ctxt->path); + ctxt->path = NULL; + } + if (URL == NULL) return; + buf[index] = 0; +- while (*cur != 0) { ++ while ((*cur != 0) || (index < 4090)) { + if ((cur[0] == ':') && (cur[1] == '/') && (cur[2] == '/')) { + buf[index] = 0; + ctxt->protocol = xmlMemStrdup(buf); + index = 0; + cur += 3; + break; + } + buf[index++] = *cur++; + } +- if (*cur == 0) return; ++ if ((*cur == 0) || (index >= 4090)) return; + + buf[index] = 0; +- while (1) { ++ while (index < 4090) { + if (cur[0] == ':') { + buf[index] = 0; + ctxt->hostname = xmlMemStrdup(buf); + index = 0; + cur += 1; +@@ -212,16 +212,16 @@ + index = 0; + break; + } + buf[index++] = *cur++; + } +- if (*cur == 0) ++ if ((*cur == 0) || (index >= 4090)) + ctxt->path = xmlMemStrdup("/"); + else { + index = 0; + buf[index] = 0; +- while (*cur != 0) ++ while ((*cur != 0) && (index < 4090)) + buf[index++] = *cur++; + buf[index] = 0; + ctxt->path = xmlMemStrdup(buf); + } + } +@@ -256,23 +256,23 @@ + else + printf("Using HTTP proxy %s\n", URL); + #endif + if (URL == NULL) return; + buf[index] = 0; +- while (*cur != 0) { ++ while ((*cur != 0) && (index < 4090)) { + if ((cur[0] == ':') && (cur[1] == '/') && (cur[2] == '/')) { + buf[index] = 0; + index = 0; + cur += 3; + break; + } + buf[index++] = *cur++; + } +- if (*cur == 0) return; ++ if ((*cur == 0) || (index >= 4090)) return; + + buf[index] = 0; +- while (1) { ++ while (index < 4090) { + if (cur[0] == ':') { + buf[index] = 0; + proxy = xmlMemStrdup(buf); + index = 0; + cur += 1; diff --git a/dev-libs/libxml/files/libxml-1.8.17-CVE-2009-2414-2416.patch b/dev-libs/libxml/files/libxml-1.8.17-CVE-2009-2414-2416.patch new file mode 100644 index 000000000000..7d2f7485c676 --- /dev/null +++ b/dev-libs/libxml/files/libxml-1.8.17-CVE-2009-2414-2416.patch @@ -0,0 +1,121 @@ +diff -NrU5 libxml-1.8.17.original/parser.c libxml-1.8.17/parser.c +--- libxml-1.8.17.original/parser.c 2009-08-13 20:14:27.000000000 +0000 ++++ libxml-1.8.17/parser.c 2009-08-13 20:15:38.000000000 +0000 +@@ -5162,15 +5162,19 @@ + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "Name expected in NOTATION declaration\n"); + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; +- return(ret); ++ xmlFreeEnumeration(ret); ++ return(NULL); + } + cur = xmlCreateEnumeration(name); + xmlFree(name); +- if (cur == NULL) return(ret); ++ if (cur == NULL) { ++ xmlFreeEnumeration(ret); ++ return(NULL); ++ } + if (last == NULL) ret = last = cur; + else { + last->next = cur; + last = cur; + } +@@ -5181,13 +5185,12 @@ + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "')' required to finish NOTATION declaration\n"); + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; +- if ((last != NULL) && (last != ret)) +- xmlFreeEnumeration(last); +- return(ret); ++ xmlFreeEnumeration(ret); ++ return(NULL); + } + NEXT; + return(ret); + } + +@@ -5230,15 +5233,19 @@ + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "NmToken expected in ATTLIST enumeration\n"); + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; +- return(ret); ++ xmlFreeEnumeration(ret); ++ return(NULL); + } + cur = xmlCreateEnumeration(name); + xmlFree(name); +- if (cur == NULL) return(ret); ++ if (cur == NULL) { ++ xmlFreeEnumeration(ret); ++ return(NULL); ++ } + if (last == NULL) ret = last = cur; + else { + last->next = cur; + last = cur; + } +@@ -5249,11 +5256,12 @@ + if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) + ctxt->sax->error(ctxt->userData, + "')' required to finish ATTLIST enumeration\n"); + ctxt->wellFormed = 0; + ctxt->disableSAX = 1; +- return(ret); ++ xmlFreeEnumeration(ret); ++ return(NULL); + } + NEXT; + return(ret); + } + +@@ -5713,17 +5721,29 @@ + (xmlParserCtxtPtr ctxt) { + xmlElementContentPtr ret = NULL, cur = NULL, last = NULL, op = NULL; + xmlChar *elem; + xmlChar type = 0; + ++ if (ctxt->depth > 128) { ++ ctxt->errNo = XML_ERR_ELEMCONTENT_NOT_FINISHED; ++ if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL)) ++ ctxt->sax->error(ctxt->userData, ++ "xmlParseElementChildrenContentDecl : depth %d too deep\n", ++ ctxt->depth); ++ ctxt->wellFormed = 0; ++ ctxt->disableSAX = 1; ++ return(NULL); ++ } + SKIP_BLANKS; + GROW; + if (RAW == '(') { + /* Recurse on first child */ + NEXT; + SKIP_BLANKS; ++ ctxt->depth++; + cur = ret = xmlParseElementChildrenContentDecl(ctxt); ++ ctxt->depth--; + SKIP_BLANKS; + GROW; + } else { + elem = xmlParseNameComplex(ctxt); + if (elem == NULL) { +@@ -5863,11 +5883,13 @@ + GROW; + if (RAW == '(') { + /* Recurse on second child */ + NEXT; + SKIP_BLANKS; ++ ctxt->depth++; + last = xmlParseElementChildrenContentDecl(ctxt); ++ ctxt->depth--; + SKIP_BLANKS; + } else { + elem = xmlParseNameComplex(ctxt); + if (elem == NULL) { + ctxt->errNo = XML_ERR_ELEMCONTENT_NOT_STARTED; diff --git a/dev-libs/libxml/files/libxml-1.8.17-configure-LANG.patch b/dev-libs/libxml/files/libxml-1.8.17-configure-LANG.patch new file mode 100644 index 000000000000..3ef76ef911c0 --- /dev/null +++ b/dev-libs/libxml/files/libxml-1.8.17-configure-LANG.patch @@ -0,0 +1,41 @@ +The LANG vars aren't reset early enough so when sed tries to use [a-zA-Z] in +option parsing, it may break. + +http://bugs.gentoo.org/103483 + +--- configure ++++ configure +@@ -54,6 +54,16 @@ + infodir='${prefix}/info' + mandir='${prefix}/man' + ++# NLS nuisances. ++# Only set these to C if already set. These must not be set unconditionally ++# because not all systems understand e.g. LANG=C (notably SCO). ++# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! ++# Non-C LC_CTYPE values break the ctype check. ++if test "${LANG+set}" = set; then LANG=C; export LANG; fi ++if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi ++if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi ++if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi ++ + # Initialize some other variables. + subdirs= + MFLAGS= MAKEFLAGS= +@@ -452,16 +463,6 @@ + esac + done + +-# NLS nuisances. +-# Only set these to C if already set. These must not be set unconditionally +-# because not all systems understand e.g. LANG=C (notably SCO). +-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +-# Non-C LC_CTYPE values break the ctype check. +-if test "${LANG+set}" = set; then LANG=C; export LANG; fi +-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi +- + # confdefs.h avoids OS command line length limits that DEFS can exceed. + rm -rf conftest* confdefs.h + # AIX cpp loses on an empty file, so make sure it contains at least a newline. diff --git a/dev-libs/libxml/files/libxml-1.8.17-declarations.patch b/dev-libs/libxml/files/libxml-1.8.17-declarations.patch new file mode 100644 index 000000000000..a6f029c77556 --- /dev/null +++ b/dev-libs/libxml/files/libxml-1.8.17-declarations.patch @@ -0,0 +1,172 @@ +diff -NrU5 libxml-1.8.17.original/debugXML.c libxml-1.8.17/debugXML.c +--- libxml-1.8.17.original/debugXML.c 2009-08-13 19:58:37.000000000 +0000 ++++ libxml-1.8.17/debugXML.c 2009-08-13 20:04:58.000000000 +0000 +@@ -14,13 +14,11 @@ + #endif + #include <stdio.h> + #ifdef HAVE_STDLIB_H + #include <stdlib.h> + #endif +-#ifdef HAVE_STRING_H + #include <string.h> +-#endif + #include "xmlmemory.h" + #include "tree.h" + #include "parser.h" + #include "debugXML.h" + #include "HTMLtree.h" +diff -NrU5 libxml-1.8.17.original/entities.c libxml-1.8.17/entities.c +--- libxml-1.8.17.original/entities.c 2009-08-13 19:58:37.000000000 +0000 ++++ libxml-1.8.17/entities.c 2009-08-13 20:04:58.000000000 +0000 +@@ -659,11 +659,11 @@ + #endif + buf[sizeof(buf) - 1] = 0; + ptr = buf; + while (*ptr != 0) *out++ = *ptr++; + } else if ((doc != NULL) && (doc->encoding != NULL) && +- (xmlStrEqual(doc->encoding, "UTF-8"))) { ++ (xmlStrEqual(doc->encoding, (const xmlChar *) "UTF-8"))) { + /* + * We assume we have UTF-8 input. + */ + char buf[10], *ptr; + int val = 0, l = 1; +diff -NrU5 libxml-1.8.17.original/nanoftp.c libxml-1.8.17/nanoftp.c +--- libxml-1.8.17.original/nanoftp.c 2009-08-13 19:58:37.000000000 +0000 ++++ libxml-1.8.17/nanoftp.c 2009-08-13 20:04:58.000000000 +0000 +@@ -1220,11 +1220,11 @@ + int len, i; + int res; + unsigned char ad[6], *adp, *portp; + unsigned int temp[6]; + struct sockaddr_in dataAddr; +- size_t dataAddrLen; ++ socklen_t dataAddrLen; + + ctxt->dataFd = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP); + if (ctxt->dataFd < 0) { + fprintf(stderr, "xmlNanoFTPGetConnection: failed to create socket\n"); + } +diff -NrU5 libxml-1.8.17.original/parser.c libxml-1.8.17/parser.c +--- libxml-1.8.17.original/parser.c 2009-08-13 19:58:37.000000000 +0000 ++++ libxml-1.8.17/parser.c 2009-08-13 20:04:58.000000000 +0000 +@@ -6521,11 +6521,10 @@ + if (RAW != '&') return; + + if (NXT(1) == '#') { + int i = 0; + xmlChar out[10]; +- int hex = NXT(2); + int val = xmlParseCharRef(ctxt); + + /* + * Just encode the value in UTF-8 + */ +@@ -10625,10 +10624,12 @@ + * they are not added to @node + */ + + xmlNodePtr + xmlParseBalancedChunkFile(xmlDocPtr doc, xmlNodePtr node) { ++ /* not implemented */ ++ return (xmlNodePtr) NULL; + } + + /** + * xmlRecoverDoc : + * @cur: a pointer to an array of xmlChar +@@ -10711,11 +10712,11 @@ + xmlSAXParseFile(xmlSAXHandlerPtr sax, const char *filename, + int recovery) { + xmlDocPtr ret; + xmlParserCtxtPtr ctxt; + char *directory = NULL; +- xmlSAXHandlerPtr oldsax; ++ xmlSAXHandlerPtr oldsax = NULL; + + ctxt = xmlCreateFileParserCtxt(filename); + if (ctxt == NULL) return(NULL); + if (sax != NULL) { + oldsax = ctxt->sax; +@@ -10939,11 +10940,11 @@ + int + xmlSAXUserParseFile(xmlSAXHandlerPtr sax, void *user_data, + const char *filename) { + int ret = 0; + xmlParserCtxtPtr ctxt; +- xmlSAXHandlerPtr oldsax; ++ xmlSAXHandlerPtr oldsax = NULL; + + ctxt = xmlCreateFileParserCtxt(filename); + if (ctxt == NULL) return -1; + if (sax != NULL) { + oldsax = ctxt->sax; +diff -NrU5 libxml-1.8.17.original/parser.h libxml-1.8.17/parser.h +--- libxml-1.8.17.original/parser.h 2009-08-13 19:58:37.000000000 +0000 ++++ libxml-1.8.17/parser.h 2009-08-13 20:04:58.000000000 +0000 +@@ -343,20 +343,24 @@ + int xmlStrcmp (const xmlChar *str1, + const xmlChar *str2); + int xmlStrncmp (const xmlChar *str1, + const xmlChar *str2, + int len); ++int xmlStrEqual (const xmlChar *str1, ++ const xmlChar *str2); + int xmlStrlen (const xmlChar *str); + xmlChar * xmlStrcat (xmlChar *cur, + const xmlChar *add); + xmlChar * xmlStrncat (xmlChar *cur, + const xmlChar *add, + int len); + + /** + * Basic parsing Interfaces + */ ++void xmlInitParser (void); ++void xmlInitializePredefinedEntities(void); + xmlDocPtr xmlParseDoc (xmlChar *cur); + xmlDocPtr xmlParseMemory (char *buffer, + int size); + xmlDocPtr xmlParseFile (const char *filename); + int xmlSubstituteEntitiesDefault(int val); +@@ -371,11 +375,24 @@ + xmlDocPtr xmlRecoverFile (const char *filename); + + /** + * Less common routines and SAX interfaces + */ ++int xmlParseBalancedChunkMemory(xmlDocPtr doc, ++ xmlSAXHandlerPtr sax, ++ void *user_data, ++ int depth, ++ const xmlChar *string, ++ xmlNodePtr *list); + int xmlParseDocument (xmlParserCtxtPtr ctxt); ++int xmlParseExternalEntity (xmlDocPtr doc, ++ xmlSAXHandlerPtr sax, ++ void *user_data, ++ int depth, ++ const xmlChar *URL, ++ const xmlChar *ID, ++ xmlNodePtr *list); + xmlDocPtr xmlSAXParseDoc (xmlSAXHandlerPtr sax, + xmlChar *cur, + int recovery); + int xmlSAXUserParseFile (xmlSAXHandlerPtr sax, + void *user_data, +diff -NrU5 libxml-1.8.17.original/tree.c libxml-1.8.17/tree.c +--- libxml-1.8.17.original/tree.c 2009-08-13 19:58:37.000000000 +0000 ++++ libxml-1.8.17/tree.c 2009-08-13 20:04:58.000000000 +0000 +@@ -4420,11 +4420,11 @@ + if (cur->version != NULL) + xmlBufferWriteQuotedString(buf, cur->version); + else + xmlBufferWriteChar(buf, "\"1.0\""); + if ((cur->encoding != NULL) && +- (!xmlStrEqual(cur->encoding, "UTF-8"))) { ++ (!xmlStrEqual(cur->encoding, (const xmlChar *) "UTF-8"))) { + xmlBufferWriteChar(buf, " encoding="); + xmlBufferWriteQuotedString(buf, cur->encoding); + } + switch (cur->standalone) { + /************************************************* 2.3.5 ********** diff --git a/dev-libs/libxml/files/libxml-1.8.17-open_call_fix.patch b/dev-libs/libxml/files/libxml-1.8.17-open_call_fix.patch new file mode 100644 index 000000000000..bcc7c3b71443 --- /dev/null +++ b/dev-libs/libxml/files/libxml-1.8.17-open_call_fix.patch @@ -0,0 +1,11 @@ +--- old/nanohttp.c 2000-06-28 20:33:46.000000000 +0200 ++++ new/nanohttp.c 2009-02-02 13:45:31.199209868 +0100 +@@ -1182,7 +1182,7 @@ + if (!strcmp(filename, "-")) + fd = 0; + else { +- fd = open(filename, O_CREAT | O_WRONLY); ++ fd = open(filename, O_CREAT | O_WRONLY, 0644); + if (fd < 0) { + xmlNanoHTTPClose(ctxt); + return(-1); diff --git a/dev-libs/libxml/libxml-1.8.17-r4.ebuild b/dev-libs/libxml/libxml-1.8.17-r4.ebuild new file mode 100644 index 000000000000..dbf1d9a6141c --- /dev/null +++ b/dev-libs/libxml/libxml-1.8.17-r4.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml/libxml-1.8.17-r4.ebuild,v 1.1 2009/08/13 20:30:03 vostorga Exp $ + +inherit eutils flag-o-matic + +DESCRIPTION="Version 1 of the library to manipulate XML files" +HOMEPAGE="http://www.xmlsoft.org/" +SRC_URI="ftp://xmlsoft.org/old/${P}.tar.gz" + +LICENSE="GPL-2 LGPL-2" +SLOT="1" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86" +IUSE="doc" + +RDEPEND=">=sys-libs/ncurses-5.2" +DEPEND="${RDEPEND} + >=sys-libs/readline-4.1 + doc? ( >=dev-util/gtk-doc-1 )" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${P}-configure-LANG.patch + epatch "${FILESDIR}"/${P}-open_call_fix.patch + epatch "${FILESDIR}"/${P}-declarations.patch + epatch "${FILESDIR}"/${P}-CAN-2004-0110.patch + epatch "${FILESDIR}"/${P}-CVE-2009-2414-2416.patch +} + +src_compile() { + LIBS="-lncurses" econf || die + emake CC="$(tc-getCC)" -j1 || die # Doesn't work with -j 4 (hallski) +} + +src_install() { + make DESTDIR="${D}" \ + BASE_DIR=/usr/share/doc \ + DOC_MODULE=${PF} \ + TARGET_DIR=/usr/share/doc/${PF}/html \ + install || die + + # This link must be fixed + rm "${D}"/usr/include/gnome-xml/libxml + dosym /usr/include/gnome-xml /usr/include/gnome-xml/libxml + + dodoc AUTHORS ChangeLog NEWS README +} + +pkg_preinst() { + if [[ -e ${ROOT}/usr/include/gnome-xml/libxml ]] ; then + rm -f "${ROOT}"/usr/include/gnome-xml/libxml + fi +} |