[Libreoffice-commits] core.git: xmloff/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sun Apr 11 15:04:50 UTC 2021
xmloff/source/draw/ximpstyl.cxx | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit 87586cd0e41b1dbcbf49df993d69ef7aa426f7e0
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Apr 11 14:42:33 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Apr 11 17:03:45 2021 +0200
ofz#32467 Timeout: add arbitrary master page limit when fuzzing
Change-Id: Ic95b84ceb91ccadf9d4f2dd763a4f4ec7b379381
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113950
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
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);
}
More information about the Libreoffice-commits
mailing list