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

coverity#1266492 Untrusted value as argument

Change-Id: Idbe205df445b29e7a121e93dbd74b2578199699b
üst f58b6696
...@@ -5286,7 +5286,10 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, SdrPowerPointImport& rMan, con ...@@ -5286,7 +5286,10 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, SdrPowerPointImport& rMan, con
sal_uInt32 nMaxStrLen = aString.getLength(); sal_uInt32 nMaxStrLen = aString.getLength();
if (nCharAnzRead + nStrLen > nMaxStrLen) if (nCharAnzRead + nStrLen > nMaxStrLen)
nStrLen = nMaxStrLen - nCharAnzRead; nStrLen = nMaxStrLen - nCharAnzRead;
aCharPropSet.maString = aString.copy(nCharAnzRead, nStrLen); if (nCharAnzRead > static_cast<sal_uInt32>(aString.getLength()))
aCharPropSet.maString = OUString();
else
aCharPropSet.maString = aString.copy(nCharAnzRead, nStrLen);
aCharPropList.push_back( new PPTCharPropSet( aCharPropSet, nCurrentPara ) ); aCharPropList.push_back( new PPTCharPropSet( aCharPropSet, nCurrentPara ) );
nCharAnzRead += nCharCount; nCharAnzRead += nCharCount;
bEmptyParaPossible = false; 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