summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2012-03-10 17:51:46 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2012-03-10 17:51:46 +0000
commit5339f413e8dc6f8821682654dc3f35d9c38910eb (patch)
treec76cb1668ddec8b61ee6a2201e08c37c7ccecaa9 /dev-libs/expat
parentRemove restriction for pypy as jinja is fixed now (diff)
downloadgentoo-2-5339f413e8dc6f8821682654dc3f35d9c38910eb.tar.gz
gentoo-2-5339f413e8dc6f8821682654dc3f35d9c38910eb.tar.bz2
gentoo-2-5339f413e8dc6f8821682654dc3f35d9c38910eb.zip
Move call to setContext right after the setting of salt wrt #407555 using upstream patch. Thanks to Marien Zwart for bisecting the issue.
(Portage version: 2.2.0_alpha90/cvs/Linux x86_64)
Diffstat (limited to 'dev-libs/expat')
-rw-r--r--dev-libs/expat/ChangeLog7
-rw-r--r--dev-libs/expat/expat-2.1.0_beta2.ebuild4
-rw-r--r--dev-libs/expat/files/expat-2.1.0_beta2-move_setContext_call.patch90
3 files changed, 99 insertions, 2 deletions
diff --git a/dev-libs/expat/ChangeLog b/dev-libs/expat/ChangeLog
index 4330ce83235e..8a1c549e6bdc 100644
--- a/dev-libs/expat/ChangeLog
+++ b/dev-libs/expat/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for dev-libs/expat
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/expat/ChangeLog,v 1.116 2012/03/09 13:22:04 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/expat/ChangeLog,v 1.117 2012/03/10 17:51:46 ssuominen Exp $
+
+ 10 Mar 2012; Samuli Suominen <ssuominen@gentoo.org> expat-2.1.0_beta2.ebuild,
+ +files/expat-2.1.0_beta2-move_setContext_call.patch:
+ Move call to setContext right after the setting of salt wrt #407555 using
+ upstream patch. Thanks to Marien Zwart for bisecting the issue.
*expat-2.1.0_beta2 (09 Mar 2012)
diff --git a/dev-libs/expat/expat-2.1.0_beta2.ebuild b/dev-libs/expat/expat-2.1.0_beta2.ebuild
index 382d955009e4..a2b2a8bdea2e 100644
--- a/dev-libs/expat/expat-2.1.0_beta2.ebuild
+++ b/dev-libs/expat/expat-2.1.0_beta2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/expat/expat-2.1.0_beta2.ebuild,v 1.1 2012/03/09 13:22:04 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/expat/expat-2.1.0_beta2.ebuild,v 1.2 2012/03/10 17:51:46 ssuominen Exp $
EAPI=4
inherit eutils libtool toolchain-funcs
@@ -24,6 +24,8 @@ src_unpack() {
}
src_prepare() {
+ epatch "${FILESDIR}"/${P}-move_setContext_call.patch #407555
+
elibtoolize
epunt_cxx
diff --git a/dev-libs/expat/files/expat-2.1.0_beta2-move_setContext_call.patch b/dev-libs/expat/files/expat-2.1.0_beta2-move_setContext_call.patch
new file mode 100644
index 000000000000..41034ca65184
--- /dev/null
+++ b/dev-libs/expat/files/expat-2.1.0_beta2-move_setContext_call.patch
@@ -0,0 +1,90 @@
+http://bugs.gentoo.org/407555
+http://expat.cvs.sourceforge.net/viewvc/expat/expat/lib/xmlparse.c?r1=1.168&r2=1.169
+http://sourceforge.net/tracker/?func=detail&atid=110127&aid=3500861&group_id=10127
+
+--- lib/xmlparse.c
++++ lib/xmlparse.c
+@@ -432,6 +432,9 @@
+ getElementType(XML_Parser parser, const ENCODING *enc,
+ const char *ptr, const char *end);
+
++static unsigned long generate_hash_secret_salt(void);
++static XML_Bool parsingSetup(XML_Parser parser);
++
+ static XML_Parser
+ parserCreate(const XML_Char *encodingName,
+ const XML_Memory_Handling_Suite *memsuite,
+@@ -695,22 +698,27 @@
+ return rand();
+ }
+
++static XML_Bool
++parsingSetup(XML_Parser parser)
++{
++ /* hash functions must be initialized before setContext() is called */
++ if (hash_secret_salt == 0)
++ hash_secret_salt = generate_hash_secret_salt();
++ if (parser != NULL && ns) {
++ /* implicit context only set for root parser, since child
++ parsers (i.e. external entity parsers) will inherit it
++ */
++ return setContext(parser, implicitContext);
++ }
++ return XML_TRUE;
++}
++
+ XML_Parser XMLCALL
+ XML_ParserCreate_MM(const XML_Char *encodingName,
+ const XML_Memory_Handling_Suite *memsuite,
+ const XML_Char *nameSep)
+ {
+- XML_Parser parser = parserCreate(encodingName, memsuite, nameSep, NULL);
+- if (parser != NULL && ns) {
+- /* implicit context only set for root parser, since child
+- parsers (i.e. external entity parsers) will inherit it
+- */
+- if (!setContext(parser, implicitContext)) {
+- XML_ParserFree(parser);
+- return NULL;
+- }
+- }
+- return parser;
++ return parserCreate(encodingName, memsuite, nameSep, NULL);
+ }
+
+ static XML_Parser
+@@ -946,7 +954,7 @@
+ poolClear(&temp2Pool);
+ parserInit(parser, encodingName);
+ dtdReset(_dtd, &parser->m_mem);
+- return setContext(parser, implicitContext);
++ return XML_TRUE;
+ }
+
+ enum XML_Status XMLCALL
+@@ -1499,8 +1507,10 @@
+ errorCode = XML_ERROR_FINISHED;
+ return XML_STATUS_ERROR;
+ case XML_INITIALIZED:
+- if (hash_secret_salt == 0)
+- hash_secret_salt = generate_hash_secret_salt();
++ if (!parsingSetup(parser)) {
++ errorCode = XML_ERROR_NO_MEMORY;
++ return XML_STATUS_ERROR;
++ }
+ default:
+ ps_parsing = XML_PARSING;
+ }
+@@ -1623,8 +1633,10 @@
+ errorCode = XML_ERROR_FINISHED;
+ return XML_STATUS_ERROR;
+ case XML_INITIALIZED:
+- if (hash_secret_salt == 0)
+- hash_secret_salt = generate_hash_secret_salt();
++ if (!parsingSetup(parser)) {
++ errorCode = XML_ERROR_NO_MEMORY;
++ return XML_STATUS_ERROR;
++ }
+ default:
+ ps_parsing = XML_PARSING;
+ }