[Libreoffice-commits] core.git: sax/source
Kohei Yoshida
kohei.yoshida at collabora.com
Mon Jun 30 11:02:50 PDT 2014
sax/source/fastparser/fastparser.cxx | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit 3f177756dbdb67d901453000c3f11694770d2761
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Mon Jun 30 14:01:16 2014 -0400
Check for empty() before calling top().
Else it might crash sometimes.
Change-Id: I6a24fff83c3d36346debae5c0f2b8c0646a15c01
diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx
index e8662b4..82378b1 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -660,6 +660,9 @@ sal_Int32 FastSaxParserImpl::GetTokenWithPrefix( const sal_Char*pPrefix, int nPr
sal_Int32 nNamespaceToken = FastToken::DONTKNOW;
Entity& rEntity = getEntity();
+ if (rEntity.maNamespaceCount.empty())
+ return nNamespaceToken;
+
sal_uInt32 nNamespace = rEntity.maNamespaceCount.top();
while( nNamespace-- )
{
More information about the Libreoffice-commits
mailing list