diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2014-06-03 22:55:05 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2014-06-04 09:45:58 +0100 |
commit | a2d2c7f707838511ede017ed920205b9165a35a2 (patch) | |
tree | a613a3fe27f740736ce85d8c0e2423ec8c96f927 /oox | |
parent | 53db456c04ca5a1684395b60fbd6f1bed4c9c114 (diff) |
Be more sensible about checking buffers of VML points we write.
Change-Id: Id3811dbe0cf2510ef6a851804b3886c14eca01b6
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/export/vmlexport.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx index 0f3038b5115a..f31576636944 100644 --- a/oox/source/export/vmlexport.cxx +++ b/oox/source/export/vmlexport.cxx @@ -519,6 +519,14 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRect break; default: // See EscherPropertyContainer::CreateCustomShapeProperties, by default nSeg is simply the number of points. + // FIXME: we miss out a significant amount of complexity from + // the above method here, and do some rather odd things to match. + int nElems = aVertices.nPropSize / ( nPointSize * 2); + if (nSeg > nElems) + { + SAL_WARN("oox", "Busted escher export " << nSeg << "vs . " << nElems << " truncating point stream"); + nSeg = nElems; + } for (int i = 0; i < nSeg; ++i) { sal_Int32 nX = impl_GetPointComponent(pVerticesIt, nPointSize); |