[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - lotuswordpro/source

Caolán McNamara caolanm at redhat.com
Wed Dec 9 04:14:52 PST 2015


 lotuswordpro/source/filter/lwpidxmgr.cxx  |    2 +-
 lotuswordpro/source/filter/lwpobjstrm.cxx |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 64070e8f3ec976f48e233064795eff756b6d5146
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Dec 9 11:56:52 2015 +0000

    guard against corrupt ObjIndexData
    
    Change-Id: I214991e5d34c8e335cdd8ea482f8fa4913ba637b
    (cherry picked from commit c88a23b9d44118e96de41a70ab7f87eb0aafb126)
    Reviewed-on: https://gerrit.libreoffice.org/20502
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/lotuswordpro/source/filter/lwpidxmgr.cxx b/lotuswordpro/source/filter/lwpidxmgr.cxx
index d6720e7..43208ab 100644
--- a/lotuswordpro/source/filter/lwpidxmgr.cxx
+++ b/lotuswordpro/source/filter/lwpidxmgr.cxx
@@ -215,7 +215,7 @@ void LwpIndexManager::ReadObjIndexData(LwpObjectStream* pObjStrm)
             vObjIndexs[k]->offset = pObjStrm->QuickReaduInt32();
 
         for (k = 0; k < LeafCount; k++)
-            m_TempVec[k] = pObjStrm->QuickReaduInt32();
+            m_TempVec.at(k) = pObjStrm->QuickReaduInt32();
     }
 
     for( sal_uInt16 j=0; j<LeafCount; j++ )
diff --git a/lotuswordpro/source/filter/lwpobjstrm.cxx b/lotuswordpro/source/filter/lwpobjstrm.cxx
index 7f61cdf..edbd562 100644
--- a/lotuswordpro/source/filter/lwpobjstrm.cxx
+++ b/lotuswordpro/source/filter/lwpobjstrm.cxx
@@ -170,7 +170,7 @@ sal_uInt16 LwpObjectStream::QuickRead(void* buf, sal_uInt16 len)
     memset(buf, 0, len);
     if( len > m_nBufSize - m_nReadPos )
     {
-        assert(false);
+        SAL_WARN("lwp", "read request longer than buffer");
         len = m_nBufSize - m_nReadPos;
     }
     if( m_pContentBuf && len)


More information about the Libreoffice-commits mailing list