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:46:36 -0400 |
commit | 3ede68e1cc879e6adbf6336eccaf88ced974b8b6 (patch) | |
tree | 4518d43b777af4bceec2e356559d9dc10ba0fa78 /sax | |
parent | 8197a6c15f922b6c983bce12fa6ad259fc993e6e (diff) |
Don't go further and pop the stack if it's empty.
Change-Id: I27bd30ca65cf0066cd022b4b060757913ea01fed
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 336f5eed71b7..e8662b439943 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 |