sw/source/filter/html/swhtml.cxx |    2 +-
 vcl/source/outdev/textline.cxx   |   10 +++++++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

New commits:
commit db7b9d1dbfe647c0b859ef0e0fa26e7132ab758b
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Fri Dec 16 10:05:00 2022 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Fri Dec 16 14:50:41 2022 +0000

    ofz#54334 Timeout on 8192 width/height font and underline
    
    Change-Id: Ib746c28804b0181fe306d53f3f16f70cc36520b5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144318
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx
index 7c0f2f55d7ce..c6d97ef2c56b 100644
--- a/vcl/source/outdev/textline.cxx
+++ b/vcl/source/outdev/textline.cxx
@@ -23,7 +23,7 @@
 #include <tools/helpers.hxx>
 #include <o3tl/hash_combine.hxx>
 #include <o3tl/lru_map.hxx>
-
+#include <unotools/configmgr.hxx>
 #include <vcl/lazydelete.hxx>
 #include <vcl/metaact.hxx>
 #include <vcl/settings.hxx>
@@ -276,6 +276,14 @@ void OutputDevice::ImplDrawWaveTextLine( tools::Long 
nBaseX, tools::Long nBaseY,
                                          Color aColor,
                                          bool bIsAbove )
 {
+    static bool bFuzzing = utl::ConfigManager::IsFuzzing();
+    if (bFuzzing && nWidth > 10000000)
+    {
+        SAL_WARN("vcl.gdi", "drawLine, skipping suspicious WaveTextLine of 
length: "
+                                << nWidth << " for fuzzing performance");
+        return;
+    }
+
     LogicalFontInstance* pFontInstance = mpFontInstance.get();
     tools::Long            nLineHeight;
     tools::Long            nLinePos;
commit e9203786165181badfc96dc121b0abc54778e8d5
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Fri Dec 16 09:56:36 2022 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Fri Dec 16 14:50:31 2022 +0000

    ofz#54318 Timeout
    
    Change-Id: I76fbf51841f2d5bae38c264af38377f109a8a849
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144317
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 6f9c71494461..99db72f38518 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -4628,7 +4628,7 @@ void SwHTMLParser::SetTextCollAttrs( HTMLAttrContext 
*pContext )
     short nFirstLineIndent = 0;                     // indentations
 
     auto nDepth = m_aContexts.size();
-    if (m_bFuzzing && nDepth > 512)
+    if (m_bFuzzing && nDepth > 128)
     {
         SAL_WARN("sw.html", "Not applying any more text collection attributes 
to a deeply nested node for fuzzing performance");
         nDepth = 0;

Reply via email to