[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - sax/source

Kohei Yoshida kohei.yoshida at collabora.com
Tue Jul 1 03:16:02 PDT 2014


 sax/source/fastparser/fastparser.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit be408060a5fc5177a6055b34cb0fba63256f49b0
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Mon Jun 30 13:43:55 2014 -0400

    Don't go further and pop the stack if it's empty.
    
    Change-Id: I27bd30ca65cf0066cd022b4b060757913ea01fed
    (cherry picked from commit 3ede68e1cc879e6adbf6336eccaf88ced974b8b6)
    Reviewed-on: https://gerrit.libreoffice.org/9988
    Tested-by: Michael Stahl <mstahl at redhat.com>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx
index 603adf5..82378b1 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -472,6 +472,12 @@ void Entity::characters( const OUString& sChars )
 
 void Entity::endElement()
 {
+    if (maContextStack.empty())
+    {
+        // Malformed XML stream !?
+        return;
+    }
+
     const SaxContext& aContext = maContextStack.top();
     const Reference< XFastContextHandler >& xContext( aContext.mxContext );
     if( xContext.is() ) try


More information about the Libreoffice-commits mailing list