summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorsj <sj@openoffice.org>2010-08-09 14:11:58 +0200
committersj <sj@openoffice.org>2010-08-09 14:11:58 +0200
commit57534c0d9f60b454bdfb7bd488443b42afb67658 (patch)
tree0f28deae20358f9a2bdca31ead3cd5048ffeb1bc /tools
parent06d8dc602fb3fa13f768044dc0b8058eb7b393c2 (diff)
impress197: #163250# fixed string handling, improved polygon splitting
Diffstat (limited to 'tools')
-rw-r--r--tools/source/generic/poly.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index 2290cfdbe7c2..e9f98b07adbd 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -243,6 +243,11 @@ void ImplPolygon::ImplSetSize( USHORT nNewSize, BOOL bResize )
void ImplPolygon::ImplSplit( USHORT nPos, USHORT nSpace, ImplPolygon* pInitPoly )
{
const ULONG nSpaceSize = nSpace * sizeof( Point );
+
+ //Can't fit this in :-(, throw ?
+ if (mnPoints + nSpace > USHRT_MAX)
+ return;
+
const USHORT nNewSize = mnPoints + nSpace;
if( nPos >= mnPoints )