ofz#44982 limit matrices for fuzzing, but allow importing a little

Change-Id: I708811e7e4900fc5d79445e91dc895def552d77f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131314
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara 2022-03-10 11:21:02 +00:00
parent 5b218d2c85
commit f79ebdeaaa

View File

@ -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();