Kaydet (Commit) 7af19f45 authored tarafından Caolán McNamara's avatar Caolán McNamara

check stream status and string lengths

Change-Id: I99f3d4a2ec760228f485d01fce856deb9c068431
üst f6368c29
...@@ -288,7 +288,9 @@ void Section::GetDictionary(Dictionary& rDict) ...@@ -288,7 +288,9 @@ void Section::GetDictionary(Dictionary& rDict)
for (sal_uInt32 i = 0; i < nDictCount; ++i) for (sal_uInt32 i = 0; i < nDictCount; ++i)
{ {
sal_uInt32 nId(0), nSize(0); 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) if (mnTextEnc == RTL_TEXTENCODING_UCS2)
nSize >>= 1; nSize >>= 1;
if (!nSize) if (!nSize)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment