[Libreoffice-commits] core.git: lotuswordpro/source
Caolán McNamara
caolanm at redhat.com
Tue Dec 8 06:21:59 PST 2015
lotuswordpro/source/filter/lwptabrack.cxx | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit 85a2cd37fc60cd53a892b27a18d4b5272988361c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Dec 8 14:20:52 2015 +0000
guard against corrupt m_nNumTabs
Change-Id: I41b8514a127d463ac951e5855f09416fa0456b1b
diff --git a/lotuswordpro/source/filter/lwptabrack.cxx b/lotuswordpro/source/filter/lwptabrack.cxx
index f8317b6..a07fa39 100644
--- a/lotuswordpro/source/filter/lwptabrack.cxx
+++ b/lotuswordpro/source/filter/lwptabrack.cxx
@@ -86,11 +86,12 @@ LwpTabRack::LwpTabRack(LwpObjectHeader objHdr, LwpSvStream* pStrm):LwpObject(obj
void LwpTabRack::Read()
{
-// LwpObjectID m_NextID;
m_NextID.ReadIndexed(m_pObjStrm);
m_nNumTabs = m_pObjStrm->QuickReaduInt16();
- for( int i=0; i<m_nNumTabs; i++ )
+ if (m_nNumTabs > MaxTabs)
+ throw std::out_of_range("corrupt LwpTabRack");
+ for (int i=0; i<m_nNumTabs; ++i)
{
m_aTabs[i].Read(m_pObjStrm);
m_pObjStrm->SkipExtra();
More information about the Libreoffice-commits
mailing list