[cpp-xmltooling COMMIT] in /branches/REL_1/xmltooling: internal.h util/ParserPool.cpp
noreply at shibboleth.net
noreply at shibboleth.net
Wed May 22 14:43:58 EDT 2013
Author: scantor
Date: Wed May 22 14:43:57 2013
New Revision: 1031
URL: http://svn.shibboleth.net/view/cpp-xmltooling?rev=1031&view=rev
Log:
https://issues.shibboleth.net/jira/browse/CPPXT-96
Modified:
branches/REL_1/xmltooling/internal.h
branches/REL_1/xmltooling/util/ParserPool.cpp
Modified: branches/REL_1/xmltooling/internal.h
URL: http://svn.shibboleth.net/view/cpp-xmltooling/branches/REL_1/xmltooling/internal.h?rev=1031&r1=1030&r2=1031&view=diff
==============================================================================
--- branches/REL_1/xmltooling/internal.h (original)
+++ branches/REL_1/xmltooling/internal.h Wed May 22 14:43:57 2013
@@ -54,6 +54,8 @@
#endif
#define XMLTOOLING_LOGCAT "XMLTooling"
+
+#define XMLTOOLING_ENTITY_EXPANSION_LIMIT 100
// Macros for path and directory separators.
#if defined __CYGWIN32__ && !defined __CYGWIN__
Modified: branches/REL_1/xmltooling/util/ParserPool.cpp
URL: http://svn.shibboleth.net/view/cpp-xmltooling/branches/REL_1/xmltooling/util/ParserPool.cpp?rev=1031&r1=1030&r2=1031&view=diff
==============================================================================
--- branches/REL_1/xmltooling/util/ParserPool.cpp (original)
+++ branches/REL_1/xmltooling/util/ParserPool.cpp Wed May 22 14:43:57 2013
@@ -104,7 +104,17 @@
ParserPool::ParserPool(bool namespaceAware, bool schemaAware)
- : m_namespaceAware(namespaceAware), m_schemaAware(schemaAware), m_lock(Mutex::create()), m_security(new SecurityManager()) {}
+ : m_namespaceAware(namespaceAware), m_schemaAware(schemaAware), m_lock(Mutex::create()), m_security(new SecurityManager()) {
+
+ int expLimit = 0;
+ const char* env = getenv("XMLTOOLING_ENTITY_EXPANSION_LIMIT");
+ if (env) {
+ expLimit = atoi(env);
+ }
+ if (expLimit <= 0)
+ expLimit = XMLTOOLING_ENTITY_EXPANSION_LIMIT;
+ m_security->setEntityExpansionLimit(expLimit);
+}
ParserPool::~ParserPool()
{
More information about the commits
mailing list