hwpfilter/source/hwpreader.cxx | 8 ++++++++ include/sal/log-areas.dox | 1 + 2 files changed, 9 insertions(+)
New commits: commit 0609ee7ec0748b85bcc2b741c73b5f2cbb2f35d1 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Apr 25 11:32:44 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Apr 25 17:25:33 2022 +0200 ofz#46794 Timeout Change-Id: I58bfdbe4bab0ee8b7ff49f937711dff649392bbc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133373 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> 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 ) diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox index 4e9c3105c844..f6b67006b255 100644 --- a/include/sal/log-areas.dox +++ b/include/sal/log-areas.dox @@ -227,6 +227,7 @@ certain functionality. @li @c filter.config @li @c filter.eps +@li @c filter.hwp - Hangul word processor import @li @c filter.icgm @li @c filter.ms - escher import/export @li @c filter.odfflatxml