diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-04-25 11:32:44 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-04-25 17:25:33 +0200 |
commit | 0609ee7ec0748b85bcc2b741c73b5f2cbb2f35d1 (patch) | |
tree | 2a2a461cb9e98588dcf1037d96aa6c2280bbb58f /hwpfilter | |
parent | tdf#126672 Add search field to extension manager (diff) | |
download | core-0609ee7ec0748b85bcc2b741c73b5f2cbb2f35d1.tar.gz core-0609ee7ec0748b85bcc2b741c73b5f2cbb2f35d1.zip |
ofz#46794 Timeout
Change-Id: I58bfdbe4bab0ee8b7ff49f937711dff649392bbc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133373
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'hwpfilter')
-rw-r--r-- | hwpfilter/source/hwpreader.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx index 3560d6d4b334..a6df282ede5b 100644 --- a/hwpfilter/source/hwpreader.cxx +++ b/hwpfilter/source/hwpreader.cxx @@ -29,6 +29,7 @@ #include <tools/stream.hxx> #include <basegfx/numeric/ftools.hxx> #include <basegfx/point/b2dpoint.hxx> +#include <unotools/configmgr.hxx> #include "fontmap.hxx" #include "formula.h" @@ -40,6 +41,7 @@ #include <sal/types.h> #include <rtl/character.hxx> #include <rtl/ustrbuf.hxx> +#include <sal/log.hxx> // xmloff/xmlkyd.hxx constexpr OUStringLiteral sXML_CDATA = u"CDATA"; @@ -955,6 +957,12 @@ void HwpReader::makeMasterStyles() PageSetting *pPrevSet = nullptr; PageSetting *pPage = nullptr; + if (nMax > SAL_MAX_UINT16 && utl::ConfigManager::IsFuzzing()) + { + SAL_WARN("filter.hwp", "too many pages: " << nMax << " clip to " << SAL_MAX_UINT16); + nMax = SAL_MAX_UINT16; + } + for( i = 1; i <= nMax ; i++ ) { if( i == 1 ) |