diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-06-20 14:55:34 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-06-20 18:20:36 +0200 |
commit | f2bcf8f5b383232a4f9f345b94f4b40b646edb22 (patch) | |
tree | d81f38861fb7e9dae1385026918658c5951d3208 /editeng/source/rtf | |
parent | 30a17b05fb8a860c1e53cb7cfc405b1cea0a9d15 (diff) |
ofz#24932 Timeout
Change-Id: I3251824ac2613ac7fd994f66effb8be26aa8a7ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117512
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'editeng/source/rtf')
-rw-r--r-- | editeng/source/rtf/svxrtf.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx index fe1f18adcb0d..8bde87443c49 100644 --- a/editeng/source/rtf/svxrtf.cxx +++ b/editeng/source/rtf/svxrtf.cxx @@ -27,6 +27,7 @@ #include <svl/itempool.hxx> #include <i18nlangtag/languagetag.hxx> #include <tools/debug.hxx> +#include <unotools/configmgr.hxx> #include <comphelper/string.hxx> @@ -633,6 +634,10 @@ SvxRTFItemStackType* SvxRTFParser::GetAttrSet_() xNew->SetRTFDefaults( GetRTFDefaults() ); aAttrStack.push_back( std::move(xNew) ); + + if (aAttrStack.size() > 1024 && utl::ConfigManager::IsFuzzing()) + throw std::range_error("ecStackOverflow"); + bNewGroup = false; return aAttrStack.back().get(); } |