summaryrefslogtreecommitdiff
path: root/writerfilter/source/ooxml/OOXMLFactory.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'writerfilter/source/ooxml/OOXMLFactory.cxx')
-rwxr-xr-xwriterfilter/source/ooxml/OOXMLFactory.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/writerfilter/source/ooxml/OOXMLFactory.cxx b/writerfilter/source/ooxml/OOXMLFactory.cxx
index 6fac03898e42..964d9e1cb5ee 100755
--- a/writerfilter/source/ooxml/OOXMLFactory.cxx
+++ b/writerfilter/source/ooxml/OOXMLFactory.cxx
@@ -263,7 +263,13 @@ OOXMLFactory::createFastChildContext(OOXMLFastContextHandler * pHandler,
OOXMLFactory_ns::Pointer_t pFactory = getFactoryForNamespace(nDefine);
- return createFastChildContextFromFactory(pHandler, pFactory, Element);
+ uno::Reference< xml::sax::XFastContextHandler> ret;
+
+ //Avoid handling unknown tokens and recursing to death
+ if ((Element & 0xffff) < OOXML_FAST_TOKENS_END)
+ ret = createFastChildContextFromFactory(pHandler, pFactory, Element);
+
+ return ret;
}
void OOXMLFactory::characters(OOXMLFastContextHandler * pHandler,