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 | d93fa011d713100775cd3ac88c468b6830d48877 (patch) | |
tree | f327e060b1847306f881fe90d0949393c052939d | |
parent | 3940aa73191d27efba9c70331d6460b78fe9320a (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 54b88d853..9fa607468 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 61d99b434..0a76504af 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(); |