diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-12-09 11:56:52 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-12-10 09:37:31 +0000 |
commit | 19e7ddab12098e9352fab9062b011d3b53e4a2ca (patch) | |
tree | e0cf8e5b51f50984fae8c7a50bc638d0f0e86014 | |
parent | 7097ee0c9e54b3d1303b4cb5d8aff2cf509e466b (diff) |
guard against corrupt ObjIndexData
Change-Id: I214991e5d34c8e335cdd8ea482f8fa4913ba637b
(cherry picked from commit c88a23b9d44118e96de41a70ab7f87eb0aafb126)
Reviewed-on: https://gerrit.libreoffice.org/20503
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
-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 d6720e706e06..43208ab7a92c 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 7f61cdfb509d..edbd56255929 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) |