summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-08-26 11:25:03 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-08-26 11:30:02 +0100
commit334dba623dfb0c4fb2b5292c2d03741b7b33aef1 (patch)
tree65340bc8c6b1eb4d272ab799876b5db819456c21 /filter
parent15166358d850e76fde98afcff7f62812ce5378e3 (diff)
fix crash on loading certain ppts
Change-Id: I544a67e3706c7d12414cc075118ef2f0f5ddd0f6
Diffstat (limited to 'filter')
-rw-r--r--filter/source/msfilter/svdfppt.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 47e9f35fb558..f5b79315cc29 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -4019,13 +4019,13 @@ PPTStyleSheet::PPTStyleSheet( const DffRecordHeader& rSlideHd, SvStream& rIn, Sd
ReadDffRecordHeader( rIn, aTxMasterStyleHd );
if ( aTxMasterStyleHd.nRecType == PPT_PST_TxMasterStyleAtom )
{
- sal_uInt16 nLevelAnz;
- rIn.ReadUInt16( nLevelAnz );
+ sal_uInt16 nLevelAnz(0);
+ rIn.ReadUInt16(nLevelAnz);
sal_uInt16 nLev = 0;
bool bFirst = true;
bFoundTxMasterStyleAtom04 = true;
- while ( rIn.GetError() == 0 && rIn.Tell() < aTxMasterStyleHd.GetRecEndFilePos() && nLev < nLevelAnz )
+ while (rIn.GetError() == 0 && rIn.Tell() < aTxMasterStyleHd.GetRecEndFilePos() && nLev < nLevelAnz && nLev < nMaxPPTLevels)
{
if ( nLev )
{