[PATCH] fdo#34997: fixed crash when reading malformed fieldmark tags in ODT

Cédric Bosdonnat cedric.bosdonnat.ooo at free.fr
Wed May 18 09:08:02 PDT 2011


---
 xmloff/source/text/txtimp.cxx |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index 1c1e90f..5112a5a 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -2682,7 +2682,8 @@ void XMLTextImportHelper::pushFieldCtx( ::rtl::OUString name, ::rtl::OUString ty
 
 void XMLTextImportHelper::popFieldCtx()
 {
-    m_pImpl->m_FieldStack.pop();
+    if ( !m_pImpl->m_FieldStack.empty() )
+        m_pImpl->m_FieldStack.pop();
 }
 
 void XMLTextImportHelper::addFieldParam( ::rtl::OUString name, ::rtl::OUString value )
-- 
1.7.3.4


--=-l216rw+370/BlO429GE2--



More information about the LibreOffice mailing list