diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-02-02 10:38:27 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-02-02 10:57:21 +0000 |
commit | c8bd2518dda4593681626c4780f492995dff66e3 (patch) | |
tree | ae789c925d46f80f5a120d54eb71d3e4e9ff18e5 /filter/source | |
parent | coverity#1244944 Untrusted value as argument (diff) | |
download | core-c8bd2518dda4593681626c4780f492995dff66e3.tar.gz core-c8bd2518dda4593681626c4780f492995dff66e3.zip |
coverity#1266492 Untrusted value as argument
Change-Id: Idbe205df445b29e7a121e93dbd74b2578199699b
Diffstat (limited to 'filter/source')
-rw-r--r-- | filter/source/msfilter/svdfppt.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index fab6c672b636..73b1a09ace5f 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -5286,7 +5286,10 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, SdrPowerPointImport& rMan, con sal_uInt32 nMaxStrLen = aString.getLength(); if (nCharAnzRead + nStrLen > nMaxStrLen) 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 ) ); nCharAnzRead += nCharCount; bEmptyParaPossible = false; |