[Libreoffice-commits] core.git: starmath/source

Takeshi Abe tabe at fixedpoint.jp
Mon Jul 25 19:44:20 UTC 2016


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

New commits:
commit eee5d67d06c8e0c81ab0874171af0d5c4de18860
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Tue Jul 26 00:30:12 2016 +0900

    starmath: Fix invalid static_cast
    
    which caused an undefined behavior by downcasting SmSpecialNode
    to SmMathSymbolNode.
    
    Change-Id: I00b6d2111733bddffa31d12c85fbb5bbdd675f76
    Reviewed-on: https://gerrit.libreoffice.org/27531
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx
index 4fd66bc..890f979 100644
--- a/starmath/source/mathmlexport.cxx
+++ b/starmath/source/mathmlexport.cxx
@@ -796,7 +796,7 @@ void SmXMLExport::ExportTable(const SmNode *pNode, int nLevel)
 
 void SmXMLExport::ExportMath(const SmNode *pNode, int /*nLevel*/)
 {
-    const SmMathSymbolNode *pTemp = static_cast<const SmMathSymbolNode *>(pNode);
+    const SmTextNode *pTemp = static_cast<const SmTextNode *>(pNode);
     SvXMLElementExport *pMath = nullptr;
 
     if (pNode->GetType() == NMATH || pNode->GetType() == NGLYPH_SPECIAL)


More information about the Libreoffice-commits mailing list