diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-02-19 14:31:39 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-02-19 21:44:25 +0100 |
commit | 5f0eacd721bb98a49d6066c28d4d8fddd8fda292 (patch) | |
tree | 922ec4612d28d7ad026c6f531730a1c8a1bfc129 /sc | |
parent | ff63bae0133e3b90b32af88a4307fb4f5dafd95f (diff) |
ofz#5991 limit num of qpro tabs for fuzzing
Change-Id: Ifa205912ee0970657debdc17339e3df0c581a18f
Reviewed-on: https://gerrit.libreoffice.org/49998
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/inc/qpro.hxx | 1 | ||||
-rw-r--r-- | sc/source/filter/qpro/qpro.cxx | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/sc/source/filter/inc/qpro.hxx b/sc/source/filter/inc/qpro.hxx index 94d6c4325ddd..8bc67f04e901 100644 --- a/sc/source/filter/inc/qpro.hxx +++ b/sc/source/filter/inc/qpro.hxx @@ -38,6 +38,7 @@ class ScQProReader sal_uInt32 mnOffset; SvStream *mpStream; bool mbEndOfFile; + const SCTAB mnMaxTab; public: ScQProReader(SvStream* pStream); diff --git a/sc/source/filter/qpro/qpro.cxx b/sc/source/filter/qpro/qpro.cxx index e1b172ea53a4..10cdabe172c0 100644 --- a/sc/source/filter/qpro/qpro.cxx +++ b/sc/source/filter/qpro/qpro.cxx @@ -32,6 +32,7 @@ #include <document.hxx> #include <formulacell.hxx> #include <tools/stream.hxx> +#include <unotools/configmgr.hxx> #include <docoptio.hxx> #include <scdll.hxx> #include <memory> @@ -142,6 +143,7 @@ ScQProReader::ScQProReader(SvStream* pStream) , mnOffset(0) , mpStream(pStream) , mbEndOfFile(false) + , mnMaxTab(utl::ConfigManager::IsFuzzing() ? 128 : MAXTAB) { if( mpStream ) { @@ -178,7 +180,7 @@ ErrCode ScQProReader::parse( ScDocument *pDoc ) break; case 0x00ca: // Beginning of sheet - if( nTab <= MAXTAB ) + if (nTab <= mnMaxTab) { if( nTab < 26 ) { |