starmath/source/mathml/export.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ead23d945fb7bc794996c82287282bc385296ada
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed Aug 31 11:27:07 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Wed Aug 31 20:53:26 2022 +0200

    cid#1509247 reserve here can't be right
    
    the assumption is that m_aSvXMLElementExportList[m_nDepth] can be
    written to here, so it should at least be resize not reserve
    
    Change-Id: I2bb6074ca9dd2f71e17f5b9ec955e4d6d65edaa9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139098
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/starmath/source/mathml/export.cxx 
b/starmath/source/mathml/export.cxx
index 1c88d3f5664d..b55be509216b 100644
--- a/starmath/source/mathml/export.cxx
+++ b/starmath/source/mathml/export.cxx
@@ -1063,7 +1063,7 @@ public:
     inline void setDepthData(SvXMLElementExport* aSvXMLElementExportList)
     {
         if (m_nDepth == m_aSvXMLElementExportList.size())
-            m_aSvXMLElementExportList.reserve(m_aSvXMLElementExportList.size() 
+ 1024);
+            m_aSvXMLElementExportList.resize(m_aSvXMLElementExportList.size() 
+ 1024);
         m_aSvXMLElementExportList[m_nDepth] = aSvXMLElementExportList;
     }
 

Reply via email to