From f4b80fc579abcb372ba87f08b575dbdb080dd077 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 15 May 2018 15:46:57 +0100 Subject: [PATCH] ofz#6352 set limits for useful fuzzing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Id4a2dab7da84adf6c6268340dff34e8776abe924 Reviewed-on: https://gerrit.libreoffice.org/54383 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sc/source/filter/excel/impop.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 #include #include -#include #include #include #include +#include #include +#include #include #include @@ -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(nLastRow, MAXROW_30); + } + if( ValidColRow( nLastCol, nLastRow ) ) { if( nFirstCol && nFirstRow )