[Libreoffice-commits] core.git: Branch 'aoo/trunk' - comphelper/source sfx2/inc sw/source

pats pats at apache.org
Fri Dec 1 03:11:18 UTC 2017


 comphelper/source/container/embeddedobjectcontainer.cxx |    6 +++---
 sfx2/inc/sfx2/linkmgr.hxx                               |    7 ++++---
 sw/source/filter/ww8/ww8scan.cxx                        |    6 ++++++
 3 files changed, 13 insertions(+), 6 deletions(-)

New commits:
commit e144b9671ddbac5c2cce1187f4d391899396d2b2
Author: pats <pats at apache.org>
Date:   Fri Dec 1 02:52:47 2017 +0000

    Security fixes from 4.1.5

diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx
index 8943fd975560..41d93ec3fcd6 100644
--- a/comphelper/source/container/embeddedobjectcontainer.cxx
+++ b/comphelper/source/container/embeddedobjectcontainer.cxx
@@ -127,7 +127,7 @@ EmbeddedObjectContainer::EmbeddedObjectContainer()
     pImpl = new EmbedImpl;
     pImpl->mxStorage = ::comphelper::OStorageHelper::GetTemporaryStorage();
     pImpl->mbOwnsStorage = true;
-    pImpl->mbUserAllowsLinkUpdate = false;
+    pImpl->mbUserAllowsLinkUpdate = true;
     pImpl->mpTempObjectContainer = 0;
 }
 
@@ -136,7 +136,7 @@ EmbeddedObjectContainer::EmbeddedObjectContainer( const uno::Reference < embed::
     pImpl = new EmbedImpl;
     pImpl->mxStorage = rStor;
     pImpl->mbOwnsStorage = false;
-    pImpl->mbUserAllowsLinkUpdate = false;
+    pImpl->mbUserAllowsLinkUpdate = true;
     pImpl->mpTempObjectContainer = 0;
 }
 
@@ -145,7 +145,7 @@ EmbeddedObjectContainer::EmbeddedObjectContainer( const uno::Reference < embed::
     pImpl = new EmbedImpl;
     pImpl->mxStorage = rStor;
     pImpl->mbOwnsStorage = false;
-    pImpl->mbUserAllowsLinkUpdate = false;
+    pImpl->mbUserAllowsLinkUpdate = true;
     pImpl->mpTempObjectContainer = 0;
     pImpl->m_xModel = xModel;
 }
diff --git a/sfx2/inc/sfx2/linkmgr.hxx b/sfx2/inc/sfx2/linkmgr.hxx
index 7bb58ee015ca..9dd045f045a3 100644
--- a/sfx2/inc/sfx2/linkmgr.hxx
+++ b/sfx2/inc/sfx2/linkmgr.hxx
@@ -111,6 +111,10 @@ public:
 
     SvLinkSourceRef CreateObj( SvBaseLink* );
 
+
+    // Automatically ask user about update all links, on first insert
+    void SetAutoAskUpdateAllLinks();
+
     void        UpdateAllLinks( sal_Bool bAskUpdate = sal_True,
                                 sal_Bool bCallErrHdl = sal_True,
                                 sal_Bool bUpdateGrfLinks = sal_False,
@@ -147,9 +151,6 @@ public:
                                 const ::com::sun::star::uno::Any & rValue,
                                 Graphic& rGrf );
 
-    // Automatically ask user about update all links, on first insert
-    void SetAutoAskUpdateAllLinks();
-
 private:
                 LinkManager( const LinkManager& );
                 LinkManager& operator=( const LinkManager& );
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index acf3a8e94b6e..f2f1391592b3 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -6467,6 +6467,12 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
 
     if( nMax )
     {
+        // Check size consistency
+        if(nMax > nFFn)
+        {
+            throw std::out_of_range("WW8 beyond end of buffer");
+        }
+
         // allocate Index Array
         pFontA = new WW8_FFN[ nMax ];
         p = pFontA;


More information about the Libreoffice-commits mailing list