[Libreoffice-commits] .: Branch 'libreoffice-3-3' - 3 commits - sw/source
René Engelhard
rene at kemper.freedesktop.org
Fri Nov 26 08:43:10 PST 2010
sw/source/filter/ww8/ww8par.cxx | 9 ++++++++-
sw/source/filter/ww8/ww8scan.cxx | 17 +++++++++++++----
2 files changed, 21 insertions(+), 5 deletions(-)
New commits:
commit 580a800a1d059ec54d54298db71765fafb2872a8
Merge: 56a6681... e2bbfbc...
Author: Rene Engelhard <rene at debian.org>
Date: Fri Nov 26 17:42:02 2010 +0100
Merge commit 'ooo/OOO330_m17' into libreoffice-3-3
commit e2bbfbc07382adcac481920e1c4cec9fa89557b5
Merge: ea2f3cd... 51e16dd...
Author: Kurt Zenker <kz at openoffice.org>
Date: Tue Nov 23 16:56:24 2010 +0100
CWS-TOOLING: integrate CWS os145
commit 51e16dd567de56d3a84abeb5f1fc5eee274993d8
Author: os <os at openoffice.org>
Date: Mon Nov 22 16:46:59 2010 +0100
#b7001883# exit if sprm array is invalid
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 04341ab..016a9c8 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -4919,7 +4919,14 @@ ULONG WW8Reader::Read(SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const St
}
SwWW8ImplReader* pRdr = new SwWW8ImplReader(nVersion, pStg, pIn, rDoc,
rBaseURL, bNew);
- nRet = pRdr->LoadDoc( rPam );
+ try
+ {
+ nRet = pRdr->LoadDoc( rPam );
+ }
+ catch( const std::exception& )
+ {
+ nRet = ERR_WW8_NO_WW8_FILE_ERR;
+ }
delete pRdr;
if( refStrm.Is() )
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 36ef485..0784a18 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -892,11 +892,18 @@ void WW8SprmIter::SetSprms(const BYTE* pSprms_, long nLen_)
const BYTE* WW8SprmIter::operator ++( int )
{
- if (nRemLen > 0)
+ if (nRemLen > 0 )
{
- pSprms += nAktSize;
- nRemLen -= nAktSize;
- UpdateMyMembers();
+ if( nRemLen >= nAktSize )
+ {
+ pSprms += nAktSize;
+ nRemLen -= nAktSize;
+ UpdateMyMembers();
+ }
+ else
+ {
+ throw( ::std::exception() );
+ }
}
return pSprms;
}
@@ -3247,6 +3254,8 @@ void WW8PLCFx_Cp_FKP::GetSprms(WW8PLCFxDesc* p)
Otherwise our cool fastsave algorithm can be brought to bear on the
problem.
*/
+ if( !pPieceIter )
+ return;
ULONG nOldPos = pPieceIter->GetIdx();
bool bOk = pPieceIter->SeekPos(nOrigCp);
pPieceIter->SetIdx( nOldPos );
More information about the Libreoffice-commits
mailing list