Kaydet (Commit) 55a4c5d6 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1266492 Untrusted value as argument

Change-Id: Ie7fa1318660b1647639fe09d5b6fe97e901e483a
üst 3899939d
......@@ -5282,14 +5282,16 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, SdrPowerPointImport& rMan, con
}
else
{
sal_uInt32 nStrLen = nCharCount;
sal_uInt32 nMaxStrLen = aString.getLength();
if (nCharAnzRead + nStrLen > nMaxStrLen)
nStrLen = nMaxStrLen - nCharAnzRead;
if (nCharAnzRead > static_cast<sal_uInt32>(aString.getLength()))
aCharPropSet.maString = OUString();
else
{
sal_Int32 nStrLen = nCharCount;
sal_Int32 nMaxStrLen = aString.getLength() - nCharAnzRead;
if (nStrLen > nMaxStrLen)
nStrLen = nMaxStrLen;
aCharPropSet.maString = aString.copy(nCharAnzRead, nStrLen);
}
aCharPropList.push_back( new PPTCharPropSet( aCharPropSet, nCurrentPara ) );
nCharAnzRead += nCharCount;
bEmptyParaPossible = false;
......
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