sw/source/core/doc/number.cxx    |    4 ++++
 sw/source/core/txtnode/ndtxt.cxx |    5 +++++
 2 files changed, 9 insertions(+)

New commits:
commit 23be1f562f1de9e05cfdb0dcbb9757634a20229b
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sun Aug 11 21:11:17 2024 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Mon Aug 12 09:28:09 2024 +0200

    ofz#68761 Timeout when fuzzing
    
    Change-Id: Id6612bb33550843a91eb99657d3526391fb44ddc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171738
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Tested-by: Jenkins

diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx
index e0c5b2d172b6..802d40983930 100644
--- a/sw/source/core/doc/number.cxx
+++ b/sw/source/core/doc/number.cxx
@@ -158,6 +158,10 @@ void SwNumRule::RemoveTextNode( SwTextNode& rTextNode )
 
     maTextNodeList.erase( aIter );
 
+    // just incredibly slow to do this
+    if (comphelper::IsFuzzing())
+        return;
+
     // Just in case we remove a node after we have marked the rule invalid, 
but before we have validated the tree
     if (mbInvalidRuleFlag)
     {
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index f71f2da5830b..e1d16d08114d 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -20,6 +20,7 @@
 #include <hintids.hxx>
 #include <hints.hxx>
 
+#include <comphelper/configuration.hxx>
 #include <comphelper/lok.hxx>
 #include <comphelper/string.hxx>
 #include <editeng/fontitem.hxx>
@@ -5280,6 +5281,10 @@ namespace {
         if ( !mrTextNode.IsInList() )
             return;
 
+        // just incredibly slow to do this
+        if (comphelper::IsFuzzing())
+            return;
+
         if ( mbUpdateListLevel )
         {
             auto const nLevel(mrTextNode.GetAttrListLevel());

Reply via email to