diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-12-09 11:56:52 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-12-09 11:56:52 +0000 |
commit | c88a23b9d44118e96de41a70ab7f87eb0aafb126 (patch) | |
tree | b247e2d248a5064ad95fa087abb80396c2c76e7a | |
parent | fc943ea85a7924ce0552b08eef99ed8e02f0b965 (diff) |
guard against corrupt ObjIndexData
Change-Id: I214991e5d34c8e335cdd8ea482f8fa4913ba637b
-rw-r--r-- | lotuswordpro/source/filter/lwpidxmgr.cxx | 2 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpobjstrm.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lotuswordpro/source/filter/lwpidxmgr.cxx b/lotuswordpro/source/filter/lwpidxmgr.cxx index 2e675f3bae7b..8d02521b0585 100644 --- a/lotuswordpro/source/filter/lwpidxmgr.cxx +++ b/lotuswordpro/source/filter/lwpidxmgr.cxx @@ -213,7 +213,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 2ab543a4cba9..9a4e19df31f6 100644 --- a/lotuswordpro/source/filter/lwpobjstrm.cxx +++ b/lotuswordpro/source/filter/lwpobjstrm.cxx @@ -169,7 +169,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) |