ofz#6352 set limits for useful fuzzing

Change-Id: Id4a2dab7da84adf6c6268340dff34e8776abe924
Reviewed-on: https://gerrit.libreoffice.org/54383
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara
2018-05-15 15:46:57 +01:00
parent 414226273a
commit f4b80fc579

View File

@@ -30,11 +30,12 @@
#include <editeng/editobj.hxx>
#include <editeng/editstat.hxx>
#include <editeng/flditem.hxx>
#include <svx/pageitem.hxx>
#include <editeng/colritem.hxx>
#include <sfx2/printer.hxx>
#include <sfx2/docfile.hxx>
#include <svx/pageitem.hxx>
#include <svl/zforlist.hxx>
#include <unotools/configmgr.hxx>
#include <sfx2/objsh.hxx>
#include <tools/urlobj.hxx>
@@ -1080,6 +1081,12 @@ void ImportExcel::TableOp()
nInpRow2 = aIn.ReaduInt16();
nInpCol2 = aIn.ReaduInt16();
if (utl::ConfigManager::IsFuzzing())
{
//shrink to smallish arbitrary value to not timeout
nLastRow = std::min<sal_uInt16>(nLastRow, MAXROW_30);
}
if( ValidColRow( nLastCol, nLastRow ) )
{
if( nFirstCol && nFirstRow )