xmloff/source/draw/ximpstyl.cxx | 5 +++++ 1 file changed, 5 insertions(+)
New commits: commit 87586cd0e41b1dbcbf49df993d69ef7aa426f7e0 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sun Apr 11 14:42:33 2021 +0100 Commit: Caolán McNamara <caol...@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 <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@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); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits