Kaydet (Commit) 61d30c1e authored tarafından Caolán McNamara's avatar Caolán McNamara Kaydeden (comit) Andras Timar

check seek

Change-Id: I358758999bb918e73cdee2224e575e72c2131453
(cherry picked from commit 0c713e45)
Reviewed-on: https://gerrit.libreoffice.org/18098Reviewed-by: 's avatarDavid Tardon <dtardon@redhat.com>
Tested-by: 's avatarDavid Tardon <dtardon@redhat.com>
üst ade04a55
...@@ -399,7 +399,8 @@ SvStream& ReadSvxMSDffSolverContainer( SvStream& rIn, SvxMSDffSolverContainer& r ...@@ -399,7 +399,8 @@ SvStream& ReadSvxMSDffSolverContainer( SvStream& rIn, SvxMSDffSolverContainer& r
if ( aHd.nRecType == DFF_msofbtSolverContainer ) if ( aHd.nRecType == DFF_msofbtSolverContainer )
{ {
DffRecordHeader aCRule; 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 ); ReadDffRecordHeader( rIn, aCRule );
if ( aCRule.nRecType == DFF_msofbtConnectorRule ) if ( aCRule.nRecType == DFF_msofbtConnectorRule )
...@@ -408,7 +409,8 @@ SvStream& ReadSvxMSDffSolverContainer( SvStream& rIn, SvxMSDffSolverContainer& r ...@@ -408,7 +409,8 @@ SvStream& ReadSvxMSDffSolverContainer( SvStream& rIn, SvxMSDffSolverContainer& r
rIn >> *pRule; rIn >> *pRule;
rContainer.aCList.push_back( pRule ); rContainer.aCList.push_back( pRule );
} }
aCRule.SeekToEndOfRecord( rIn ); if (!aCRule.SeekToEndOfRecord(rIn))
break;
} }
} }
return rIn; return rIn;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment