summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-09-10 14:41:42 +0100
committerAndras Timar <andras.timar@collabora.com>2014-09-15 17:07:48 +0200
commitd605999ec93066fcd890913d40b5e6abac27389b (patch)
treeab26d1c4b689082958a2dc7b22080a1ade9785fe /vcl
parent2b0cddf1ff276da8790dd5f59a7e1f5e6c3a5566 (diff)
clip PolyPolygon::Insert on .svm load
valgrind + bff (cherry picked from commit fd64d444b730f6cb7216dac8f6e3f94b97d7ab60) Conflicts: tools/source/generic/poly2.cxx Change-Id: Ib3ed8a6e518c0686f8cbeaf021b9ca3a07005032 Reviewed-on: https://gerrit.libreoffice.org/11382 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/metaact.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index 2bc51b4e6ce5..744ec580d227 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -1174,6 +1174,12 @@ void MetaPolyPolygonAction::Read( SvStream& rIStm, ImplMetaReadData* )
rIStm >> nIndex;
Polygon aPoly;
aPoly.Read( rIStm );
+ if (nIndex >= maPolyPoly.Count())
+ {
+ SAL_WARN("vcl.gdi", "svm contains polygon index " << nIndex
+ << " outside possible range " << maPolyPoly.Count());
+ continue;
+ }
maPolyPoly.Replace( aPoly, nIndex );
}
}