summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-08-27 20:16:58 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-08-27 20:21:41 +0100
commit0c713e45f9831073e34777f50abf9b5801f08ed9 (patch)
tree3b5f676764ea6030d9af6847b9eed6d790f2dd71 /filter
parent42732d255423700461f4abadfed77d89efa9cdd0 (diff)
check seek
Change-Id: I358758999bb918e73cdee2224e575e72c2131453
Diffstat (limited to 'filter')
-rw-r--r--filter/source/msfilter/msdffimp.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 7cfde35fa546..011624a20d8d 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -410,7 +410,8 @@ SvStream& ReadSvxMSDffSolverContainer( SvStream& rIn, SvxMSDffSolverContainer& r
if ( aHd.nRecType == DFF_msofbtSolverContainer )
{
DffRecordHeader aCRule;
- while ( ( rIn.GetError() == 0 ) && ( rIn.Tell() < aHd.GetRecEndFilePos() ) )
+ auto nEndPos = DffPropSet::SanitizeEndPos(rIn, aHd.GetRecEndFilePos());
+ while ( ( rIn.GetError() == 0 ) && ( rIn.Tell() < nEndPos ) )
{
ReadDffRecordHeader( rIn, aCRule );
if ( aCRule.nRecType == DFF_msofbtConnectorRule )
@@ -419,7 +420,8 @@ SvStream& ReadSvxMSDffSolverContainer( SvStream& rIn, SvxMSDffSolverContainer& r
rIn >> *pRule;
rContainer.aCList.push_back( pRule );
}
- aCRule.SeekToEndOfRecord( rIn );
+ if (!aCRule.SeekToEndOfRecord(rIn))
+ break;
}
}
return rIn;