diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-04-06 21:37:47 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-04-06 21:37:47 +0100 |
commit | 0f067f99ba968bb58025335f446caf02ec26ca5c (patch) | |
tree | d31196ed7bf46a33e04a8ebb1eba43dbf6f7a462 | |
parent | 3321962b611c6222f51f1c6ad72b70bc3b2a800b (diff) |
avoid possibility of accessing out of range ObjTimes
-rw-r--r-- | lotuswordpro/source/filter/lwpidxmgr.hxx | 2 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpobjid.cxx | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lotuswordpro/source/filter/lwpidxmgr.hxx b/lotuswordpro/source/filter/lwpidxmgr.hxx index c146ef20abf4..605efb352062 100644 --- a/lotuswordpro/source/filter/lwpidxmgr.hxx +++ b/lotuswordpro/source/filter/lwpidxmgr.hxx @@ -112,7 +112,7 @@ protected: public: void Read( LwpSvStream *pStrm ); sal_uInt32 GetObjOffset( LwpObjectID objid ); - sal_uInt32 GetObjTime( sal_uInt16 index ) { return m_TimeTable[index-1]; } + sal_uInt32 GetObjTime( sal_uInt16 index ) { return m_TimeTable.at(index-1); } }; #endif diff --git a/lotuswordpro/source/filter/lwpobjid.cxx b/lotuswordpro/source/filter/lwpobjid.cxx index c445bfcfd3ca..28f54ad494fe 100644 --- a/lotuswordpro/source/filter/lwpobjid.cxx +++ b/lotuswordpro/source/filter/lwpobjid.cxx @@ -148,11 +148,11 @@ sal_uInt32 LwpObjectID::ReadIndexed(LwpObjectStream *pStrm) LwpGlobalMgr* pGlobal = LwpGlobalMgr::GetInstance(); LwpObjectFactory* pFactory = pGlobal->GetLwpObjFactory(); LwpIndexManager* pIdxMgr = pFactory->GetIndexManager(); - m_nLow = pIdxMgr->GetObjTime( (sal_uInt16)m_nIndex); + m_nLow = pIdxMgr->GetObjTime( (sal_uInt16)m_nIndex); } else { - pStrm->QuickRead(&m_nLow, sizeof(m_nLow)); + pStrm->QuickRead(&m_nLow, sizeof(m_nLow)); } pStrm->QuickRead(&m_nHigh, sizeof(m_nHigh)); return DiskSizeIndexed(); |