summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorobo <obo@openoffice.org>2010-12-09 10:48:50 +0100
committerobo <obo@openoffice.org>2010-12-09 10:48:50 +0100
commit3d3105c8d406f1b90b10c40bd0c07602cd989291 (patch)
treeb5e83dd2502fb4215418a459484db389803a8d3a
parentbaa3cdb1a532bb79ec3fbfbc23cbb4ee4b566308 (diff)
parent2e512af879c769bd29ddaf00dbd3eae60d3d4813 (diff)
CWS-TOOLING: integrate CWS impress205
Notes
split repo tag: libs-gui_ooo/OOO330_m18 split repo tag: libs-gui_ooo/OOO330_m19
-rw-r--r--vcl/source/gdi/metaact.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index 79d875542509..f398888a33b6 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -1441,7 +1441,7 @@ void MetaTextArrayAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
rIStm >> mnLen;
rIStm >> nAryLen;
- if ( mnIndex > mnLen )
+ if ( mnIndex + mnLen > maStr.Len() )
{
mnIndex = 0;
mpDXAry = 0;
@@ -1481,6 +1481,12 @@ void MetaTextArrayAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
sal_Unicode* pBuffer = maStr.AllocBuffer( nLen );
while ( nLen-- )
rIStm >> *pBuffer++;
+
+ if ( mnIndex + mnLen > maStr.Len() )
+ {
+ mnIndex = 0;
+ delete[] mpDXAry, mpDXAry = NULL;
+ }
}
}