diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-01-09 16:27:15 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-01-09 17:38:53 +0100 |
commit | fee2ccddfc228675662e1afe97e41eb66076cb26 (patch) | |
tree | 7d296398eeaa4fdc9cd4bdd51da8a98456ec97eb /filter | |
parent | ofz#5157 Direct-leak (diff) | |
download | core-fee2ccddfc228675662e1afe97e41eb66076cb26.tar.gz core-fee2ccddfc228675662e1afe97e41eb66076cb26.zip |
i <= 5 is nonsense here
Change-Id: Id0b378c282446e09c494613e3d8be48859b7309d
Reviewed-on: https://gerrit.libreoffice.org/47665
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/msfilter/svdfppt.cxx | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index f7e3da573eff..5f0b33973bb9 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -3322,21 +3322,15 @@ PPTExtParaProv::PPTExtParaProv( SdrPowerPointImport& rMan, SvStream& rSt, const { sal_uInt16 nDepth = 0, i = 0; rSt.ReadUInt16( nDepth ); - if ( i <= 5 ) + auto nHdEndRecPos = DffPropSet::SanitizeEndPos(rSt, aHd.GetRecEndFilePos()); + while ( ( rSt.GetError() == ERRCODE_NONE ) && ( rSt.Tell() < nHdEndRecPos ) && ( i < nDepth ) ) { - auto nHdEndRecPos = DffPropSet::SanitizeEndPos(rSt, aHd.GetRecEndFilePos()); - while ( ( rSt.GetError() == ERRCODE_NONE ) && ( rSt.Tell() < nHdEndRecPos ) && ( i < nDepth ) ) - { - bStyles = true; - ReadPPTExtParaLevel( rSt, aExtParaSheet[ (TSS_Type)aHd.nRecInstance ].aExtParaLevel[ i++ ] ); - } -#ifdef DBG_UTIL - if ( rSt.Tell() != aHd.GetRecEndFilePos() ) - OSL_FAIL( "PPTExParaProv::PPTExParaProv - error reading PPT_PST_ExtendedParagraphMasterAtom (SJ)" ); -#endif + bStyles = true; + ReadPPTExtParaLevel( rSt, aExtParaSheet[ (TSS_Type)aHd.nRecInstance ].aExtParaLevel[ i++ ] ); } #ifdef DBG_UTIL - else OSL_FAIL( "PPTExParaProv::PPTExParaProv - depth is greater than 5 (SJ)" ); + if ( rSt.Tell() != aHd.GetRecEndFilePos() ) + OSL_FAIL( "PPTExParaProv::PPTExParaProv - error reading PPT_PST_ExtendedParagraphMasterAtom (SJ)" ); #endif } #ifdef DBG_UTIL |