[Libreoffice-commits] core.git: sc/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Sep 17 14:32:52 UTC 2021


 sc/source/filter/excel/xiescher.cxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit d02f39f67539682fd6fc673796e95f935dd139f0
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Sep 17 11:59:31 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Sep 17 16:32:19 2021 +0200

    ofz: Avoid timeout
    
    Change-Id: If2ba222d5e3cb2baa692487332d6cfc28d5be532
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122251
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index 9122b207a605..9ccd3521c391 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -43,6 +43,7 @@
 
 #include <sfx2/objsh.hxx>
 #include <unotools/moduleoptions.hxx>
+#include <unotools/configmgr.hxx>
 #include <unotools/fltrcfg.hxx>
 #include <vcl/dibtools.hxx>
 #include <vcl/gdimtf.hxx>
@@ -1503,6 +1504,12 @@ void XclImpTextObj::DoPreProcessSdrObj( XclImpDffConverter& rDffConv, SdrObject&
         {
             if( maTextData.mxString->IsRich() )
             {
+                if (maTextData.mxString->GetText().getLength() > 1024 && utl::ConfigManager::IsFuzzing())
+                {
+                    SAL_WARN("sc.filter", "truncating slow long rich text for fuzzing performance");
+                    maTextData.mxString->SetText(maTextData.mxString->GetText().copy(0, 1024));
+                }
+
                 // rich text
                 std::unique_ptr< EditTextObject > xEditObj(
                     XclImpStringHelper::CreateTextObject( GetRoot(), *maTextData.mxString ) );


More information about the Libreoffice-commits mailing list