starmath/source/mathml/import.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit a8815905278e9df47bb0aea80affc2c30055b316
Author:     Julien Nabet <serval2...@yahoo.fr>
AuthorDate: Sun Feb 27 11:47:44 2022 +0100
Commit:     Julien Nabet <serval2...@yahoo.fr>
CommitDate: Sun Feb 27 12:33:59 2022 +0100

    cid#1500496: Uninitialized pointer read
    
    Values retrieved from SmMlAttribute::setDefaultAttributeValue in case 
SmMlAttributeValueType::MlMaxsize
    see 
https://opengrok.libreoffice.org/xref/core/starmath/source/mathml/attribute.cxx?r=ffaaec23#94
    
    Change-Id: Ie36254157da7ce85223ca71e2070fbd075b52699
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130620
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>
    Reviewed-by: Julien Nabet <serval2...@yahoo.fr>
    Tested-by: Jenkins

diff --git a/starmath/source/mathml/import.cxx 
b/starmath/source/mathml/import.cxx
index d09b29e21b9c..a9af99c07949 100644
--- a/starmath/source/mathml/import.cxx
+++ b/starmath/source/mathml/import.cxx
@@ -1049,7 +1049,10 @@ void SmMLImportContext::handleAttributes(const 
Reference<XFastAttributeList>& aA
             {
                 SmMlMaxsize aMaxsize;
                 if (IsXMLToken(aIter, XML_INFINITY))
+                {
                     aMaxsize.m_aMaxsize = 
SmMlAttributeValueMaxsize::MlInfinity;
+                    aMaxsize.m_aLengthValue = { SmLengthUnit::MlP, 10000, new 
OUString(u"10000%") };
+                }
                 else
                 {
                     aMaxsize.m_aMaxsize = SmMlAttributeValueMaxsize::MlFinite;

Reply via email to