[Libreoffice-commits] .: Branch 'libreoffice-3-3' - lotuswordpro/source

Michael Meeks mmeeks at kemper.freedesktop.org
Thu Apr 7 03:32:57 PDT 2011


 lotuswordpro/source/filter/lwpidxmgr.hxx |    2 +-
 lotuswordpro/source/filter/lwpobjid.cxx  |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit d74a6ab18ffdb0f1eb796dc9211e7d2109d348c8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Apr 6 21:37:47 2011 +0100

    avoid possibility of accessing out of range ObjTimes

diff --git a/lotuswordpro/source/filter/lwpidxmgr.hxx b/lotuswordpro/source/filter/lwpidxmgr.hxx
index 54b88d8..9fa6074 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 b4e5a85..7cfe6be 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();


More information about the Libreoffice-commits mailing list