summaryrefslogtreecommitdiff
path: root/include/filter/msfilter
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 /include/filter/msfilter
parent15166358d850e76fde98afcff7f62812ce5378e3 (diff)
fix crash on loading certain ppts
Change-Id: I544a67e3706c7d12414cc075118ef2f0f5ddd0f6
Diffstat (limited to 'include/filter/msfilter')
-rw-r--r--include/filter/msfilter/svdfppt.hxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/include/filter/msfilter/svdfppt.hxx b/include/filter/msfilter/svdfppt.hxx
index def0fd11b936..bfcea450f3d8 100644
--- a/include/filter/msfilter/svdfppt.hxx
+++ b/include/filter/msfilter/svdfppt.hxx
@@ -170,6 +170,8 @@ const sal_uInt32 PPTInventor = sal_uInt32('P') * 0x00000001
+ sal_uInt32('T') * 0x00010000
+ sal_uInt32('0') * 0x01000000;
+const int nMaxPPTLevels = 5;
+
// Object IDs for StarDraw UserData
#define PPT_OBJECTINFO_ID (1)
@@ -705,7 +707,7 @@ struct PPTExtParaLevel
struct PPTExtParaSheet
{
- PPTExtParaLevel aExtParaLevel[ 5 ];
+ PPTExtParaLevel aExtParaLevel[nMaxPPTLevels];
};
struct PPTBuGraEntry
@@ -750,7 +752,7 @@ struct PPTCharLevel
struct PPTCharSheet
{
- PPTCharLevel maCharLevel[ 5 ];
+ PPTCharLevel maCharLevel[nMaxPPTLevels];
explicit PPTCharSheet( sal_uInt32 nInstance );
PPTCharSheet( const PPTCharSheet& rCharSheet );
@@ -783,7 +785,7 @@ struct PPTParaSheet
{
public:
- PPTParaLevel maParaLevel[ 5 ];
+ PPTParaLevel maParaLevel[nMaxPPTLevels];
explicit PPTParaSheet( sal_uInt32 nInstance );
PPTParaSheet( const PPTParaSheet& rParaSheet );
@@ -988,8 +990,8 @@ struct PPTRuler
sal_Int32 nFlags;
sal_uInt16 nDefaultTab;
- sal_uInt16 nTextOfs[ 5 ];
- sal_uInt16 nBulletOfs[ 5 ];
+ sal_uInt16 nTextOfs[nMaxPPTLevels];
+ sal_uInt16 nBulletOfs[nMaxPPTLevels];
PPTTabEntry* pTab;
sal_uInt16 nTabCount;