oox/source/export/vmlexport.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit 96d839a991d7d271adce37a41bccf54b015c9c35 Author: Mike Kaganski <[email protected]> AuthorDate: Tue Feb 16 14:08:14 2021 +0300 Commit: Mike Kaganski <[email protected]> CommitDate: Tue Feb 16 15:36:24 2021 +0100 Fix index out of range when vml-shape-types is missing See https://lists.freedesktop.org/archives/libreoffice/2021-February/086844.html Change-Id: Id38061c03dc80700872b41f54c679ee3120df9f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110988 Tested-by: Xisco Fauli <[email protected]> Tested-by: Jenkins Reviewed-by: Xisco Fauli <[email protected]> Reviewed-by: Mike Kaganski <[email protected]> diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx index a9e5dcf6d20c..07157edc3f85 100644 --- a/oox/source/export/vmlexport.cxx +++ b/oox/source/export/vmlexport.cxx @@ -1310,13 +1310,13 @@ sal_Int32 VMLExport::StartShape() // a predefined shape? static std::vector<OString> aShapeTypes = lcl_getShapeTypes(); - OString aShapeType = aShapeTypes[ m_nShapeType ]; - if ( aShapeType != "NULL" ) + SAL_WARN_IF(m_nShapeType >= aShapeTypes.size(), "oox.vml", "Unknown shape type!"); + if (m_nShapeType < aShapeTypes.size() && aShapeTypes[m_nShapeType] != "NULL") { bReferToShapeType = true; if ( !m_aShapeTypeWritten[ m_nShapeType ] ) { - m_pSerializer->write( aShapeType.getStr() ); + m_pSerializer->write(aShapeTypes[m_nShapeType]); m_aShapeTypeWritten[ m_nShapeType ] = true; } } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
