summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-03-30 14:02:51 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-03-30 14:15:22 +0100
commit0d658dfc8ffdc91f3dcb2bd34dde1dbae76ad8ae (patch)
tree0b3593b5c683692b87b35c7bbbebf84a325da8a2
parent0cd7ccb87e70982e416322587661cbfde01505ec (diff)
ofz#969 endless loop in ppt loading
Change-Id: If68bf21cd135c64957cc6def654230daa5240698
-rw-r--r--filter/source/msfilter/svdfppt.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index d7c9a007694a..4b31ec3ef5ef 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -1380,14 +1380,14 @@ SdrPowerPointImport::SdrPowerPointImport( PowerPointImportParam& rParam, const O
if ( aPersistHd.nRecType == PPT_PST_PersistPtrIncrementalBlock )
{
sal_uLong nPibLen = aPersistHd.GetRecEndFilePos();
- while ( bOk && ( rStCtrl.GetError() == 0 ) && ( rStCtrl.Tell() < nPibLen ) )
+ while (bOk && rStCtrl.good() && (rStCtrl.Tell() < nPibLen))
{
sal_uInt32 nOfs(0);
rStCtrl.ReadUInt32( nOfs );
sal_uInt32 nAnz = nOfs;
nOfs &= 0x000FFFFF;
nAnz >>= 20;
- while ( bOk && ( rStCtrl.GetError() == 0 ) && ( nAnz > 0 ) && ( nOfs <= nPersistPtrAnz ) )
+ while (bOk && rStCtrl.good() && (nAnz > 0) && (nOfs <= nPersistPtrAnz))
{
sal_uInt32 nPt(0);
rStCtrl.ReadUInt32( nPt );