diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-02-04 10:25:39 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-02-04 11:11:01 +0000 |
commit | 55a4c5d62974f0e50ac27b6d4215e8130d7604f3 (patch) | |
tree | 0a5723994cf8ae62efe64f165dd19ec5ea13cd1d /filter/source | |
parent | coverity#1242895 Untrusted loop bound (diff) | |
download | core-55a4c5d62974f0e50ac27b6d4215e8130d7604f3.tar.gz core-55a4c5d62974f0e50ac27b6d4215e8130d7604f3.zip |
coverity#1266492 Untrusted value as argument
Change-Id: Ie7fa1318660b1647639fe09d5b6fe97e901e483a
Diffstat (limited to 'filter/source')
-rw-r--r-- | filter/source/msfilter/svdfppt.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 73b1a09ace5f..d7d9cf1db313 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -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; |