[Libreoffice-commits] core.git: include/vcl vcl/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Mon Jul 12 10:08:18 UTC 2021


 include/vcl/metaact.hxx             |    2 +-
 vcl/source/filter/svm/SvmReader.cxx |    3 ++-
 vcl/source/gdi/metaact.cxx          |    4 +---
 3 files changed, 4 insertions(+), 5 deletions(-)

New commits:
commit 8de07ff2aced7ee74466ff61379e8d593bf8dc2a
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Jul 11 19:33:41 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Jul 12 12:07:45 2021 +0200

    cid#1487034 explicitly pass len of aArray
    
    Change-Id: Ia632df2967d3aa75ba0bcedcc899851dc80bab69
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118757
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index c59257433daa..d43e646811fa 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -567,7 +567,7 @@ public:
     void            SetText(OUString& rStr) { maStr = rStr; }
     void            SetIndex(sal_Int32 rIndex) { mnIndex = rIndex; }
     void            SetLen(sal_Int32 rLen) { mnLen = rLen; }
-    void            SetDXArray(tools::Long* rDXAry);
+    void            SetDXArray(tools::Long* rDXAry, sal_Int32 nAryLen);
 };
 
 class SAL_DLLPUBLIC_RTTI MetaStretchTextAction final : public MetaAction
diff --git a/vcl/source/filter/svm/SvmReader.cxx b/vcl/source/filter/svm/SvmReader.cxx
index 4d39ef317eba..815ddae52a38 100644
--- a/vcl/source/filter/svm/SvmReader.cxx
+++ b/vcl/source/filter/svm/SvmReader.cxx
@@ -739,7 +739,8 @@ rtl::Reference<MetaAction> SvmReader::TextArrayHandler(ImplMetaReadData* pData)
         }
     }
 
-    pAction->SetDXArray(aArray.get());
+    if (aArray)
+        pAction->SetDXArray(aArray.get(), nTmpLen);
     return pAction;
 }
 
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index bd3c6d60681f..2348db306853 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -1242,10 +1242,8 @@ void MetaTextArrayAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
     }
 }
 
-void MetaTextArrayAction::SetDXArray(tools::Long* pDXAry)
+void MetaTextArrayAction::SetDXArray(tools::Long* pDXAry, sal_Int32 nAryLen)
 {
-    const sal_Int32 nAryLen = pDXAry ? mnLen : 0;
-
     if (nAryLen > 0)
     {
         mpDXAry.reset( new tools::Long[ nAryLen ] );


More information about the Libreoffice-commits mailing list