diff options
Diffstat (limited to 'sd/source/filter')
-rw-r--r-- | sd/source/filter/ppt/propread.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sd/source/filter/ppt/propread.cxx b/sd/source/filter/ppt/propread.cxx index ed1f9e4923d2..6854a7dc1a44 100644 --- a/sd/source/filter/ppt/propread.cxx +++ b/sd/source/filter/ppt/propread.cxx @@ -326,7 +326,13 @@ void Section::Read( SotStorageStream *pStrm ) mnTextEnc = RTL_TEXTENCODING_MS_1252; sal_uInt32 nSecSize(0), nPropCount(0); - pStrm->ReadUInt32( nSecSize ).ReadUInt32( nPropCount ); + pStrm->ReadUInt32(nSecSize).ReadUInt32(nPropCount); + if (nSecSize > nStrmSize) + { + SAL_WARN("sd.filter", "Section Len " << nSecSize << " claimed, only " << nStrmSize << " possible"); + nSecSize = nStrmSize; + } + while (nPropCount--) { sal_uInt32 nPropId(0), nPropOfs(0); @@ -514,7 +520,7 @@ void Section::Read( SotStorageStream *pStrm ) } pStrm->Seek(nCurrent); } - pStrm->Seek( nSecOfs + nSecSize ); + pStrm->Seek(nSecOfs + nSecSize); } Section& Section::operator=( const Section& rSection ) |