summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/metaact.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-09-10 14:41:42 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-09-10 14:42:19 +0100
commitfd64d444b730f6cb7216dac8f6e3f94b97d7ab60 (patch)
tree390c0b7de03ef4cf7c94ea6bb5eb5286820010c5 /vcl/source/gdi/metaact.cxx
parentaba0106926ceb337035cf46611ff0d590a2af28b (diff)
clip PolyPolygon::Insert on .svm load
valgrind + bff Change-Id: Ib3ed8a6e518c0686f8cbeaf021b9ca3a07005032
Diffstat (limited to 'vcl/source/gdi/metaact.cxx')
-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 93dbfa6aace7..2417e0ff4de1 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -1077,6 +1077,12 @@ void MetaPolyPolygonAction::Read( SvStream& rIStm, ImplMetaReadData* )
rIStm.ReadUInt16( 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 );
}
}