diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-05-15 15:46:57 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-05-16 09:55:26 +0200 |
commit | f4b80fc579abcb372ba87f08b575dbdb080dd077 (patch) | |
tree | 99fccfa2687cbe7182d1851040729b8c39dd4922 /sc/source/filter/excel | |
parent | 414226273aa4dc0e2d06cbd482ffac37ea9338c3 (diff) |
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>
Diffstat (limited to 'sc/source/filter/excel')
-rw-r--r-- | sc/source/filter/excel/impop.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx index 85ebffc50295..44585254d753 100644 --- a/sc/source/filter/excel/impop.cxx +++ b/sc/source/filter/excel/impop.cxx @@ -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 ) |