diff options
author | Caolán McNamara <caolanm@redhat.com> | 2023-02-07 20:14:23 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2023-02-07 21:08:32 +0000 |
commit | ded56141c44971aa4b279bf232f0383b5b679694 (patch) | |
tree | 775cc3bc0b3ab46ffea11a6c71552bdd19707ab2 /vcl | |
parent | 91fa7cc3dc124877f810599fe3c315cda6d03df6 (diff) |
ofz#55771 Timeout
Change-Id: If10047bc9da297c70c6f0457680e84e788b7c438
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146644
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/outdev/textline.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
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; |