summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorHans-Joachim Lankenau <hjs@openoffice.org>2010-12-14 15:42:18 +0100
committerHans-Joachim Lankenau <hjs@openoffice.org>2010-12-14 15:42:18 +0100
commitf69093f3e3c8e1499b686af4518c74d234a5801f (patch)
treeecae6bcdd43b581b0302856daa8aa6728630cf1e /vcl/source
parenta5509a421f2f3d43aad1ba5d32e6c7bf1c015b3b (diff)
parent3d3105c8d406f1b90b10c40bd0c07602cd989291 (diff)
merge OOO330
Diffstat (limited to 'vcl/source')
-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;
+ }
}
}