From f79ebdeaaacd08328142eedf048f77e11b035801 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Thu, 10 Mar 2022 11:21:02 +0000 Subject: [PATCH] ofz#44982 limit matrices for fuzzing, but allow importing a little MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I708811e7e4900fc5d79445e91dc895def552d77f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131314 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- sc/source/core/data/documen4.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx index b7eecde0edb1..9ec96b77b243 100644 --- a/sc/source/core/data/documen4.cxx +++ b/sc/source/core/data/documen4.cxx @@ -271,6 +271,14 @@ void ScDocument::InsertMatrixFormula(SCCOL nCol1, SCROW nRow1, SAL_WARN("sc", "ScDocument::InsertMatrixFormula: No table marked"); return; } + if (utl::ConfigManager::IsFuzzing()) + { + // just too slow + if (nCol2 - nCol1 > 1024) + return; + if (nRow2 - nRow1 > 1024) + return; + } assert( ValidColRow( nCol1, nRow1) && ValidColRow( nCol2, nRow2)); SCTAB nTab1 = *rMark.begin();