summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-05-31 21:33:56 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-06-01 13:08:31 +0200
commit1d75ed970a4f698f48793a71fdba1f15f3cf3e5e (patch)
tree15dd533c928055fe611dd98279fc4643ce3d5504
parentbea47ebdb4bb634ad647e3b653fa7e31d7c4b6ab (diff)
ofz#6440 timeout during fuzzing
Change-Id: I720c64b9bb14cee33ffab5547a7353e83f23a14c Reviewed-on: https://gerrit.libreoffice.org/55147 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sc/source/filter/lotus/op.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/sc/source/filter/lotus/op.cxx b/sc/source/filter/lotus/op.cxx
index 7dec5cfbd0d1..6fca43504b8d 100644
--- a/sc/source/filter/lotus/op.cxx
+++ b/sc/source/filter/lotus/op.cxx
@@ -31,6 +31,7 @@
#include <editeng/udlnitem.hxx>
#include <editeng/wghtitem.hxx>
#include <editeng/justifyitem.hxx>
+#include <unotools/configmgr.hxx>
#include <formulacell.hxx>
#include <rangenam.hxx>
@@ -323,9 +324,15 @@ void OP_Window1(LotusContext& rContext, SvStream& r, sal_uInt16 n)
nDefWidth = static_cast<sal_uInt16>( TWIPS_PER_CHAR * nDefWidth );
+ const bool bFuzzing = utl::ConfigManager::IsFuzzing();
+
// instead of default, set all Cols in SC by hand
- for( SCCOL nCol = 0 ; nCol <= MAXCOL ; nCol++ )
+ for (SCCOL nCol = 0 ; nCol <= MAXCOL ; nCol++)
+ {
rContext.pDoc->SetColWidth( nCol, 0, nDefWidth );
+ if (bFuzzing)
+ break;
+ }
}
void OP_Blank(LotusContext& rContext, SvStream& r, sal_uInt16 /*n*/)