summaryrefslogtreecommitdiff
path: root/sd/source/filter/ppt
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/filter/ppt')
-rw-r--r--sd/source/filter/ppt/propread.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sd/source/filter/ppt/propread.cxx b/sd/source/filter/ppt/propread.cxx
index b76fbcaec5b4..03e05d0623bf 100644
--- a/sd/source/filter/ppt/propread.cxx
+++ b/sd/source/filter/ppt/propread.cxx
@@ -288,7 +288,9 @@ void Section::GetDictionary(Dictionary& rDict)
for (sal_uInt32 i = 0; i < nDictCount; ++i)
{
sal_uInt32 nId(0), nSize(0);
- aStream.ReadUInt32( nId ).ReadUInt32( nSize );
+ aStream.ReadUInt32(nId).ReadUInt32(nSize);
+ if (!aStream.good() || nSize > aStream.remainingSize())
+ break;
if (mnTextEnc == RTL_TEXTENCODING_UCS2)
nSize >>= 1;
if (!nSize)