vcl/source/filter/svm/SvmReader.cxx |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit a6ec150a2ef80697aa724555ed1227fb0da382ca
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Tue Nov 8 13:50:47 2022 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Tue Nov 8 16:37:56 2022 +0100

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

diff --git a/vcl/source/filter/svm/SvmReader.cxx 
b/vcl/source/filter/svm/SvmReader.cxx
index a1fa44df9de5..253f89e91d79 100644
--- a/vcl/source/filter/svm/SvmReader.cxx
+++ b/vcl/source/filter/svm/SvmReader.cxx
@@ -21,8 +21,10 @@
 #include <osl/thread.h>
 #include <tools/stream.hxx>
 #include <tools/vcompat.hxx>
+#include <unotools/configmgr.hxx>
 
 #include <vcl/filter/SvmReader.hxx>
+#include <vcl/rendercontext/DrawTextFlags.hxx>
 #include <vcl/TypeSerializer.hxx>
 #include <vcl/dibtools.hxx>
 #include <vcl/gdimtf.hxx>
@@ -788,7 +790,13 @@ rtl::Reference<MetaAction> 
SvmReader::TextRectHandler(const ImplMetaReadData* pD
     mrStream.ReadUInt16(nTmp);
 
     pAction->SetRect(aRect);
-    pAction->SetStyle(static_cast<DrawTextFlags>(nTmp));
+
+    DrawTextFlags nFlags(static_cast<DrawTextFlags>(nTmp));
+    const static bool bFuzzing = utl::ConfigManager::IsFuzzing();
+    if (bFuzzing)
+        nFlags = nFlags & ~DrawTextFlags::MultiLine;
+
+    pAction->SetStyle(nFlags);
 
     if (aCompat.GetVersion() >= 2) // Version 2
         aStr = read_uInt16_lenPrefixed_uInt16s_ToOUString(mrStream);

Reply via email to