editeng/source/items/textitem.cxx |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

New commits:
commit 52f50ffd67de9d2e2253226b2d7f590fe45c7313
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sun Oct 8 15:27:42 2023 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Sun Oct 8 19:09:35 2023 +0200

    ofz#62236 avoid Timeout
    
    Change-Id: Ic7207ece03a30d8ffefadbf072d4da5fa66dfc12
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157688
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/editeng/source/items/textitem.cxx 
b/editeng/source/items/textitem.cxx
index 77f95f6de9ee..e4c1cdbe14cc 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -24,6 +24,7 @@
 #include <sal/log.hxx>
 #include <o3tl/safeint.hxx>
 #include <osl/diagnose.h>
+#include <unotools/configmgr.hxx>
 #include <unotools/fontdefs.hxx>
 #include <unotools/intlwrapper.hxx>
 #include <unotools/syslocale.hxx>
@@ -808,8 +809,15 @@ bool SvxFontHeightItem::PutValue( const uno::Any& rVal, 
sal_uInt8 nMemberId )
                     return false;
                 fPoint = static_cast<float>(nValue);
             }
-            if(fPoint < 0. || fPoint > 10000.)
-                    return false;
+
+            if (fPoint < 0. || fPoint > 10000.)
+                return false;
+            static bool bFuzzing = utl::ConfigManager::IsFuzzing();
+            if (bFuzzing && fPoint > 500)
+            {
+                SAL_WARN("editeng.items", "SvxFontHeightItem ignoring font 
size of " << fPoint << " for performance");
+                return false;
+            }
 
             nHeight = static_cast<tools::Long>( fPoint * 20.0 + 0.5 );        
// Twips
             if (!bConvert)

Reply via email to