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>
This commit is contained in:
Caolán McNamara
2022-04-25 11:32:44 +01:00
parent 3bbc4581b9
commit 0609ee7ec0
2 changed files with 9 additions and 0 deletions

View File

@@ -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 )

View File

@@ -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