summaryrefslogtreecommitdiff
path: root/xmloff/source
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source')
-rw-r--r--xmloff/source/draw/ximpstyl.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx
index e606c223b39d..a702872a736b 100644
--- a/xmloff/source/draw/ximpstyl.cxx
+++ b/xmloff/source/draw/ximpstyl.cxx
@@ -48,6 +48,7 @@
#include "layerimp.hxx"
#include <xmloff/XMLGraphicsDefaultStyle.hxx>
#include <XMLNumberStylesImport.hxx>
+#include <unotools/configmgr.hxx>
#include <xmloff/xmlerror.hxx>
#include <xmloff/table/XMLTableImport.hxx>
@@ -1318,6 +1319,10 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SdXMLMasterStylesConte
sal_Int32 nMasterPageCount = xMasterPages->getCount();
if (nNewMasterPageCount + 1 > nMasterPageCount)
{
+ // arbitrary limit to master pages when fuzzing to avoid deadend timeouts
+ if (nMasterPageCount >= 64 && utl::ConfigManager::IsFuzzing())
+ return nullptr;
+
// new page, create and insert
xNewMasterPage = xMasterPages->insertNewByIndex(nMasterPageCount);
}