diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-06-30 13:43:55 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-06-30 13:53:27 -0400 |
commit | b8255bc0ac513af5d9bc7ae026caf885f71569c6 (patch) | |
tree | e60983123cb921a9a1869e727eac255860e99b58 /sax | |
parent | 70b3e3c175c3f69f3781b5cbb5e33952a5562821 (diff) |
Don't go further and pop the stack if it's empty.
Change-Id: I27bd30ca65cf0066cd022b4b060757913ea01fed
(cherry picked from commit 3ede68e1cc879e6adbf6336eccaf88ced974b8b6)
Diffstat (limited to 'sax')
-rw-r--r-- | sax/source/fastparser/fastparser.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx index 0cfdb1483546..aa755136bfe6 100644 --- a/sax/source/fastparser/fastparser.cxx +++ b/sax/source/fastparser/fastparser.cxx @@ -492,6 +492,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 |