summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-06-30 13:43:55 -0400
committerMichael Stahl <mstahl@redhat.com>2014-07-01 10:15:44 +0000
commitbe408060a5fc5177a6055b34cb0fba63256f49b0 (patch)
tree886f5bd7de0e430ebda4061e4a43c61832b66d0f
parent67e3dac2663e1336be1e89b18a9af06ee7ab4fcb (diff)
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@redhat.com> Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--sax/source/fastparser/fastparser.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx
index 603adf57429b..82378b1b0275 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