vcl/source/outdev/textline.cxx |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit ded56141c44971aa4b279bf232f0383b5b679694
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Tue Feb 7 20:14:23 2023 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Tue Feb 7 21:08:32 2023 +0000

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

diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx
index 7f601075edae..3bd69a2ec994 100644
--- a/vcl/source/outdev/textline.cxx
+++ b/vcl/source/outdev/textline.cxx
@@ -352,6 +352,14 @@ void OutputDevice::ImplDrawStraightTextLine( tools::Long 
nBaseX, tools::Long nBa
                                              Color aColor,
                                              bool bIsAbove )
 {
+    static bool bFuzzing = utl::ConfigManager::IsFuzzing();
+    if (bFuzzing && nWidth > 1000000)
+    {
+        SAL_WARN("vcl.gdi", "drawLine, skipping suspicious TextLine of length: 
"
+                                << nWidth << " for fuzzing performance");
+        return;
+    }
+
     LogicalFontInstance*  pFontInstance = mpFontInstance.get();
     tools::Long            nLineHeight = 0;
     tools::Long            nLinePos  = 0;

Reply via email to