vcl/source/gdi/svmconverter.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 6198071ef3b9b30cb2b686f0a60f217f00bbef4b
Author: Caolán McNamara <caol...@redhat.com>
Date:   Thu Jan 26 14:40:57 2017 +0000

    only alloc pDXAry if we are going to use it
    
    Change-Id: I4fa075124ad55d3a06e1f3d21845f73778c841b6
    Reviewed-on: https://gerrit.libreoffice.org/33588
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Michael Stahl <mst...@redhat.com>

diff --git a/vcl/source/gdi/svmconverter.cxx b/vcl/source/gdi/svmconverter.cxx
index 633171c..f504f63 100644
--- a/vcl/source/gdi/svmconverter.cxx
+++ b/vcl/source/gdi/svmconverter.cxx
@@ -921,7 +921,6 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, 
GDIMetaFile& rMtf )
                             sal_Int32 nStrLen( aStr.getLength() );
 
                             nDXAryLen = std::max(nAryLen, nStrLen);
-                            pDXAry.reset(new long[nDXAryLen]);
 
                             if (nDXAryLen < nLen)
                             {
@@ -934,6 +933,8 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, 
GDIMetaFile& rMtf )
                             }
                             else
                             {
+                                pDXAry.reset(new long[nDXAryLen]);
+
                                 for (sal_Int32 j = 0; j < nAryLen; ++j)
                                     rIStm.ReadInt32( nTmp ), pDXAry[ j ] = 
nTmp;
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to